From de624c0b8ec15c7f91507397a637402b07ec815a Mon Sep 17 00:00:00 2001 From: Michael Black Date: Mon, 16 Mar 2020 11:17:16 -0500 Subject: [PATCH 1/2] Remove get_freq_range from icom_open --- rigs/icom/icom.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index d31a04358..f654f20d5 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -776,7 +776,9 @@ icom_rig_open(RIG *rig) priv->tx_vfo = RIG_VFO_MAIN; } +#if 0 // do not do this here -- needs to be done when ranges are requested instead icom_get_freq_range(rig); // try get to get rig range capability dyamically +#endif return RIG_OK; } @@ -825,6 +827,7 @@ int icom_set_default_vfo(RIG *rig) } priv->curr_vfo = RIG_VFO_MAIN; + return RIG_OK; } if (VFO_HAS_MAIN_SUB_ONLY) @@ -3640,10 +3643,8 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) struct icom_priv_data *priv; struct rig_state *rs; unsigned char ackbuf[MAXFRAMELEN]; - unsigned char freqbuf[32]; int ack_len = sizeof(ackbuf); vfo_t save_vfo; - int cmd, subcmd, freq_len; rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__, rig_strvfo(vfo)); rs = &rig->state; @@ -3661,12 +3662,15 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) // This eliminates VFO swapping and improves split operations if (priv->x25cmdfails == 0) { + int cmd, subcmd, freq_len; int satmode = 0; - retval = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); + // retval not important here...only satmode=1 means anything + rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode); if (satmode == 0) // only worth trying if not in satmode { + unsigned char freqbuf[32]; freq_len = priv->civ_731_mode ? 4 : 5; /* * to_bcd requires nibble len @@ -3811,7 +3815,6 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) unsigned char ackbuf[MAXFRAMELEN]; int ack_len = sizeof(ackbuf); vfo_t save_vfo; - int cmd, subcmd; rig_debug(RIG_DEBUG_VERBOSE, "%s called %s\n", __func__, rig_strvfo(vfo)); @@ -3831,8 +3834,10 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) // This does not work in satellite mode for the 9700 if (priv->x25cmdfails == 0) { + int cmd, subcmd; int satmode = 0; - retval = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); + // don't care about the retval here..only satmode=1 is important + rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode); if (satmode == 0) // only worth trying if not in satmode @@ -5027,8 +5032,6 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) // when in satmode split=off always if (VFO_HAS_MAIN_SUB_A_B_ONLY) { - struct rig_state *rs = &rig->state; - struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; vfo_t tx_vfo; split_t split; From e2ea0b77ac9bfa5762a94b9f1eb48c1dad681cbb Mon Sep 17 00:00:00 2001 From: Michael Black Date: Mon, 16 Mar 2020 11:18:20 -0500 Subject: [PATCH 2/2] Bump icom version --- rigs/icom/icom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index b3f34c053..64c9ffea0 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include #endif -#define BACKEND_VER "0.38" +#define BACKEND_VER "0.39" /* * defines used by comp_cal_str in rig.c