For all rigs avoid setting mode while PTT is on

https://github.com/Hamlib/Hamlib/issues/737
pull/739/head
Mike Black W9MDB 2021-07-12 08:57:02 -05:00
rodzic 4f500ae8e8
commit 91b3d26837
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -2216,6 +2216,13 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
RETURNFUNC(-RIG_EIO);
}
// do not mess with mode while PTT is on
if (rig->state.cache.ptt)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s PTT on so set_mode ignored\n", __func__);
return RIG_OK;
}
caps = rig->caps;
if (caps->set_mode == NULL)
@ -3999,6 +4006,13 @@ int HAMLIB_API rig_set_split_mode(RIG *rig,
RETURNFUNC(-RIG_EIO);
}
// do not mess with mode while PTT is on
if (rig->state.cache.ptt)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s PTT on so set_split_mode ignored\n", __func__);
return RIG_OK;
}
caps = rig->caps;
if (caps->set_split_mode