From 7cdaa0efd12a95af30bc8a74dd2eacdaa7b6cdaa Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Fri, 12 Jun 2020 07:57:13 -0500 Subject: [PATCH] Change icom.c VFO_TX VFO_RX adjustment to use vfo_fixup function vfo_fixup should be able to handle all rigs variations https://github.com/Hamlib/Hamlib/issues/299 --- rigs/icom/icom.c | 13 +++---------- rigs/icom/icom.h | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index b1fe81f80..0f3f29ef3 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1128,23 +1128,16 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return retval; } - // Pick the appropriate VFO when VFO_RX is requested + // Pick the appropriate VFO when VFO_RX or VFO_TX is requested if (vfo == RIG_VFO_RX) { - vfo = (rig->state.vfo_list & RIG_VFO_B) ? RIG_VFO_A : RIG_VFO_MAIN; + vfo = vfo_fixup(rig, vfo); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_RX requested, new vfo=%s\n", __func__, rig_strvfo(vfo)); } else if (vfo == RIG_VFO_TX) { - if (rig->state.vfo_list == VFO_HAS_MAIN_SUB_A_B_ONLY) - { - vfo = RIG_VFO_A; - - if (priv->split_on) { vfo = RIG_VFO_B; } - else if (rig->state.cache.satmode) { vfo = RIG_VFO_SUB; } - } - + vfo = vfo_fixup(rig, vfo); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_TX requested, new vfo=%s\n", __func__, rig_strvfo(vfo)); } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 0ba315348..9e4b8c729 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -31,7 +31,7 @@ #include #endif -#define BACKEND_VER "20200611" +#define BACKEND_VER "20200612" /* * defines used by comp_cal_str in rig.c