Fix flrig_set_split_freq_mode to allow set_freq but not set_mode during PTT

https://github.com/Hamlib/Hamlib/issues/593
This commit is contained in:
Michael Black W9MDB 2021-03-08 17:20:15 -06:00
parent 207f28b256
commit c13624add0

View File

@ -1861,12 +1861,6 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
RETURNFUNC(-RIG_ENTARGET);
}
if (priv->ptt)
{
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __func__);
RETURNFUNC(RIG_OK); // just return OK and ignore this
}
retval = flrig_set_freq(rig, RIG_VFO_B, freq);
if (retval != RIG_OK)
@ -1882,6 +1876,12 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
if (qmode == priv->curr_modeA) { RETURNFUNC(RIG_OK); }
if (priv->ptt)
{
rig_debug(RIG_DEBUG_WARN, "%s set_mode call not made as PTT=1\n", __func__);
RETURNFUNC(RIG_OK); // just return OK and ignore this
}
retval = flrig_set_mode(rig, RIG_VFO_B, priv->curr_modeA, width);
if (retval != RIG_OK)