[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 0f692f514de5a1ec31220
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-04-17 04:19:18
|
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 0f692f514de5a1ec31220f3586aaf2b3d5cdcfba (commit) from 8fe1615ccd8b5d1fb3f4edde41fee954c334a8e9 (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 0f692f514de5a1ec31220f3586aaf2b3d5cdcfba Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Apr 16 23:18:13 2021 -0500 FIx vfo_fixup to keep map VFOB request to Sub when appropriate https://github.com/Hamlib/Hamlib/issues/665 diff --git a/src/misc.c b/src/misc.c index 1da1d651..d1353041 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1638,7 +1638,7 @@ int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, // So we map these to Main/Sub as required vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo) { - rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, vfo_curr=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo)); if (vfo == RIG_VFO_CURR) { @@ -1676,13 +1676,13 @@ vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo) if (split) { vfo = RIG_VFO_B; } - if (VFO_HAS_MAIN_SUB_ONLY && !split && !satmode) { vfo = RIG_VFO_MAIN; } + if (VFO_HAS_MAIN_SUB_ONLY && !split && !satmode && vfo != RIG_VFO_B) { vfo = RIG_VFO_MAIN; } - if (VFO_HAS_MAIN_SUB_ONLY && (split || satmode)) { vfo = RIG_VFO_SUB; } + else if (VFO_HAS_MAIN_SUB_ONLY && (split || satmode || vfo == RIG_VFO_B)) { vfo = RIG_VFO_SUB; } - if (VFO_HAS_MAIN_SUB_A_B_ONLY && split) { vfo = RIG_VFO_B; } + else if (VFO_HAS_MAIN_SUB_A_B_ONLY && split) { vfo = RIG_VFO_B; } - if (VFO_HAS_MAIN_SUB_A_B_ONLY && satmode) { vfo = RIG_VFO_SUB; } + else if (VFO_HAS_MAIN_SUB_A_B_ONLY && satmode) { vfo = RIG_VFO_SUB; } rig_debug(RIG_DEBUG_TRACE, "%s: RIG_VFO_TX changed to %s, split=%d, satmode=%d\n", __func__, ----------------------------------------------------------------------- Summary of changes: src/misc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |