diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 4d9094dbd..ae7fd9a3f 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -3370,7 +3370,7 @@ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo) int satmode = 0; // e.g. IC9700 split on Main/Sub does not work // only Main VFOA/B and SubRx/MainTx split works - rig_get_func((RIG*)rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); + rig_get_func((RIG *)rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); // don't care about retval here...only care about satmode=1 if (satmode) @@ -3417,10 +3417,12 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) struct rig_state *rs; unsigned char ackbuf[MAXFRAMELEN]; int ack_len = sizeof(ackbuf); + vfo_t save_vfo; rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__, rig_strvfo(vfo)); rs = &rig->state; priv = (struct icom_priv_data *) rs->priv; + save_vfo = priv->curr_vfo; if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { @@ -3487,12 +3489,11 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) if (VFO_HAS_MAIN_SUB_A_B_ONLY) { - // Then we leave the VFO on the tx_vfo which should be Main - // in satellite mode + // Then we return the VFO to where it was rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so setting vfo to %s\n", __func__, - rig_strvfo(tx_vfo)); + rig_strvfo(save_vfo)); - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (rc = icom_set_vfo(rig, save_vfo))) { return rc; }