Do not change split freq if change not needed

https://github.com/Hamlib/Hamlib/issues/863
pull/875/head
Mike Black W9MDB 2021-11-09 17:06:48 -06:00
rodzic aa86f25321
commit eed9637675
1 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -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
{