From 135ed6686e2739ca644be18ec160ad8617969fbd Mon Sep 17 00:00:00 2001 From: Michael Black Date: Wed, 4 Dec 2019 22:32:37 -0600 Subject: [PATCH 1/4] IC910 was doing TX=VFOB RX=VFOA Need to make allowances for Main/Sub split commands eventually --- icom/icom.c | 4 ++-- icom/icom.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/icom/icom.c b/icom/icom.c index 11ad13842..2a8ebe986 100644 --- a/icom/icom.c +++ b/icom/icom.c @@ -3296,11 +3296,11 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) case RIG_SPLIT_ON: split_sc = S_SPLT_ON; - + // Need to allow for SATMODE split in here if (!priv->split_on) // only need to do this if split is not on already { /* ensure VFO A is Rx and VFO B is Tx as we assume that elsewhere */ - if (VFO_HAS_A_B_ONLY) + if (VFO_HAS_A_B) { if (RIG_OK != (rc = icom_set_vfo(rig, RIG_VFO_A))) { return rc; } } diff --git a/icom/icom.h b/icom/icom.h index 49445b32b..ceab5e589 100644 --- a/icom/icom.h +++ b/icom/icom.h @@ -30,7 +30,7 @@ #include #endif -#define BACKEND_VER "0.14" +#define BACKEND_VER "0.15" /* * defines used by comp_cal_str in rig.c From 79e640772b1ddfe7ca5d534112dc3626642a03d8 Mon Sep 17 00:00:00 2001 From: Michael Black Date: Thu, 5 Dec 2019 15:30:28 -0600 Subject: [PATCH 2/4] Fix icom_get_split_vfos for Main/Sub on SATMODE rigs --- icom/icom.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/icom/icom.c b/icom/icom.c index 2a8ebe986..4f4a89b94 100644 --- a/icom/icom.c +++ b/icom/icom.c @@ -616,8 +616,8 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq) unsigned char freqbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN]; int freq_len, ack_len = sizeof(ackbuf), retval; - rig_debug(RIG_DEBUG_VERBOSE, "%s called %s=%"PRIll"\n", __func__, - rig_strvfo(vfo), (int64_t)freq); + rig_debug(RIG_DEBUG_VERBOSE, "%s called %s=%"PRIfreq"\n", __func__, + rig_strvfo(vfo), freq); rs = &rig->state; priv = (struct icom_priv_data *)rs->priv; @@ -2809,8 +2809,15 @@ int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) */ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo) { + struct icom_priv_data *priv; + struct rig_state *rs; + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rs = (struct rig_state *)&rig->state; + priv = (struct icom_priv_data *)rs->priv; + + if (VFO_HAS_A_B_ONLY) { *rx_vfo = RIG_VFO_A; @@ -2827,8 +2834,8 @@ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo) // TBD -- newer rigs we need to find active VFO // priv->curvfo if VFOA then A/B response else priv->curvfo=Main Main/Sub response // For now we return Main/Sub - *rx_vfo = RIG_VFO_MAIN; - *tx_vfo = RIG_VFO_SUB; + *rx_vfo = priv->rx_vfo; + *tx_vfo = priv->tx_vfo; } else { @@ -3296,6 +3303,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) case RIG_SPLIT_ON: split_sc = S_SPLT_ON; + // Need to allow for SATMODE split in here if (!priv->split_on) // only need to do this if split is not on already { From 01dab576571ca899f42b4b47aa256b85e9b13cc5 Mon Sep 17 00:00:00 2001 From: Michael Black Date: Thu, 5 Dec 2019 15:33:54 -0600 Subject: [PATCH 3/4] Fix icom_get_split_vfos for Main/Sub on SATMODE rigs --- icom/icom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icom/icom.h b/icom/icom.h index ceab5e589..1cc831cf3 100644 --- a/icom/icom.h +++ b/icom/icom.h @@ -30,7 +30,7 @@ #include #endif -#define BACKEND_VER "0.15" +#define BACKEND_VER "0.16" /* * defines used by comp_cal_str in rig.c From be78cc6e319392832d19a55e7b08555f7d4d40ad Mon Sep 17 00:00:00 2001 From: Michael Black Date: Thu, 5 Dec 2019 22:38:16 -0600 Subject: [PATCH 4/4] Add priv vfo settings to icom_set_split --- icom/icom.c | 2 ++ icom/icom.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/icom/icom.c b/icom/icom.c index 4f4a89b94..934ff65b7 100644 --- a/icom/icom.c +++ b/icom/icom.c @@ -3331,6 +3331,8 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) return -RIG_ERJCTED; } + priv->rx_vfo = vfo; + priv->tx_vfo = tx_vfo; priv->split_on = RIG_SPLIT_ON == split; return RIG_OK; } diff --git a/icom/icom.h b/icom/icom.h index 1cc831cf3..0a7094de9 100644 --- a/icom/icom.h +++ b/icom/icom.h @@ -30,7 +30,7 @@ #include #endif -#define BACKEND_VER "0.16" +#define BACKEND_VER "0.17" /* * defines used by comp_cal_str in rig.c