diff --git a/src/rig.c b/src/rig.c index 66a06f60e..b1c689173 100644 --- a/src/rig.c +++ b/src/rig.c @@ -3923,6 +3923,7 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) const struct rig_caps *caps; int retcode, rc2; vfo_t curr_vfo, tx_vfo; + freq_t tfreq = 0; if (CHECK_RIG_ARG(rig)) { @@ -3945,6 +3946,14 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) tx_vfo = vfo; } + rig_get_freq(rig, tx_vfo, &tfreq); + + if (tfreq == tx_freq) + { + rig_debug(RIG_DEBUG_TRACE, "%s: freq set not needed\n", __func__); + RETURNFUNC(RIG_OK); + } + if (caps->set_split_freq && (vfo == RIG_VFO_CURR || vfo == RIG_VFO_TX @@ -4007,7 +4016,6 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) } int retry = 3; - freq_t tfreq; do {