From 8c11893a21f996f48e22f07382cc560574675504 Mon Sep 17 00:00:00 2001 From: Michael Black Date: Sat, 15 Feb 2020 23:20:31 -0600 Subject: [PATCH] Fix icom_set_split_freq to allow for RIG_VFO_CURR request --- rigs/icom/icom.c | 5 +++++ rigs/icom/icom.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 05e6cc711..8dacc2a77 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -3278,11 +3278,13 @@ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo) *rx_vfo = RIG_VFO_A; *tx_vfo = RIG_VFO_B; /* rig doesn't enforce this but convention is needed here */ + rig_debug(RIG_DEBUG_TRACE,"%s: VFO_HAS_A_B_ONLY, rx=%s, tx=%s\n", __func__, rig_strvfo(*rx_vfo), rig_strvfo(*tx_vfo)); } else if (VFO_HAS_MAIN_SUB_ONLY) { *rx_vfo = RIG_VFO_MAIN; *tx_vfo = RIG_VFO_SUB; + rig_debug(RIG_DEBUG_TRACE,"%s: VFO_HAS_MAIN_SUB_ONLY, rx=%s, tx=%s\n", __func__, rig_strvfo(*rx_vfo), rig_strvfo(*tx_vfo)); } else if (VFO_HAS_MAIN_SUB_A_B_ONLY) { @@ -3291,6 +3293,7 @@ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo) // For now we return Main/Sub *rx_vfo = priv->rx_vfo; *tx_vfo = priv->tx_vfo; + rig_debug(RIG_DEBUG_TRACE,"%s: VFO_HAS_MAIN_SUB_A_B_ONLY, rx=%s, tx=%s\n", __func__, rig_strvfo(*rx_vfo), rig_strvfo(*tx_vfo)); } else { @@ -3321,6 +3324,8 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) rs = &rig->state; priv = (struct icom_priv_data *) rs->priv; + if (vfo == RIG_VFO_CURR) vfo = priv->curr_vfo; + /* This method works also in memory mode(RIG_VFO_MEM) */ if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index bd247bf85..a374f1571 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include #endif -#define BACKEND_VER "0.26" +#define BACKEND_VER "0.27" /* * defines used by comp_cal_str in rig.c