Change get_vfo_info return VFOA cached mode/width when TARGETABLE_VFO is false

https://github.com/Hamlib/Hamlib/issues/643
pull/649/head
Michael Black W9MDB 2021-04-02 08:03:13 -05:00
rodzic bcb3aaf162
commit 33f299d16d
1 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -5999,9 +5999,17 @@ int HAMLIB_API rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq,
if (retval != RIG_OK) { RETURNFUNC(retval); }
retval = rig_get_mode(rig, vfo, mode, width);
if ((vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) && (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE))
{
retval = rig_get_mode(rig, vfo, mode, width);
if (retval != RIG_OK) { RETURNFUNC(retval); }
if (retval != RIG_OK) { RETURNFUNC(retval); }
}
else // we'll just us VFOA so we don't swap vfos -- freq is what's important
{
*mode = rig->state.cache.modeMainA;
*width = rig->state.cache.widthMainA;
}
// we should only need to ask for VFO_CURR to minimize display swapping
retval = rig_get_split(rig, RIG_VFO_CURR, split);