[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 1d74711a00dfa416a171c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-08 23:51:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 1d74711a00dfa416a171cec87c841db315c5d9f7 (commit) from 0089964af7fa1f43757083b7bc7db195ba382fe0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1d74711a00dfa416a171cec87c841db315c5d9f7 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 8 17:49:56 2021 -0600 Fix filling of range_list which affects vfo_list See also https://github.com/Hamlib/Hamlib/issues/498 https://github.com/Hamlib/Hamlib/issues/490 diff --git a/src/rig.c b/src/rig.c index 188d813a..4c76a7d9 100644 --- a/src/rig.c +++ b/src/rig.c @@ -418,10 +418,25 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) // Eventually we will have separate model number for different rig variations // So range_list1 will become just range_list (per model) // See ic9700.c for a 5-model example - memcpy(rs->tx_range_list, caps->tx_range_list1, - sizeof(struct freq_range_list)*FRQRANGESIZ); + // Every rig should have a rx_range + // Rig backends need updating for new range_list format memcpy(rs->rx_range_list, caps->rx_range_list1, sizeof(struct freq_range_list)*FRQRANGESIZ); + memcpy(rs->tx_range_list, caps->tx_range_list1, + sizeof(struct freq_range_list)*FRQRANGESIZ); + // if we don't have list1 we'll try list2 + if (RIG_IS_FRNG_END(rs->rx_range_list[0])) + { + memcpy(rs->tx_range_list, caps->rx_range_list2, + sizeof(struct freq_range_list)*FRQRANGESIZ); + memcpy(rs->rx_range_list, caps->tx_range_list2, + sizeof(struct freq_range_list)*FRQRANGESIZ); + } + if (RIG_IS_FRNG_END(rs->rx_range_list[0])) + { + rig_debug(RIG_DEBUG_ERR, "%s: rig does not have rx_range!!\n", __func__); + } + #if 0 // this is no longer applicable -- replace it with something? // we need to be able to figure out what model radio we have ----------------------------------------------------------------------- Summary of changes: src/rig.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |