Fix icom \get_mode in non-vfo mode to stay on VFOB/Sub

https://github.com/Hamlib/Hamlib/issues/676
pull/680/head
Mike Black W9MDB 2021-04-23 17:43:54 -05:00
rodzic b6a29f1e16
commit 1d79b9e01c
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -2108,8 +2108,8 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (vfo & (RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A |
RIG_VFO_CURR))
{
// then we get our current vfo..i.e. VFOA
if (rig->state.current_vfo != RIG_VFO_A)
// then we get what was asked for
if (vfo == RIG_VFO_NONE)
{
rig_debug(RIG_DEBUG_TRACE, "%s(%d): forcing default VFO_A\n", __func__,
__LINE__);

Wyświetl plik

@ -1895,6 +1895,8 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
vfo = vfo_fixup(rig, vfo);
if (vfo == RIG_VFO_CURR) vfo = curr_vfo;
// we ignore get_freq for the uplink VFO for gpredict to behave better
if ((rig->state.uplink == 1 && vfo == RIG_VFO_SUB)
|| (rig->state.uplink == 2 && vfo == RIG_VFO_MAIN))