Fix 'f VFOB' staying on VFOB instead of reverting to VFOA when VFOA is current VFO

pull/290/head
Michael Black W9MDB 2020-06-07 23:31:20 -05:00
rodzic db3ead4399
commit ee6703107f
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1415,6 +1415,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
const struct rig_caps *caps;
int retcode;
int cache_ms;
vfo_t curr_vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
@ -1424,6 +1425,8 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
return -RIG_EINVAL;
}
curr_vfo = rig->state.current_vfo; // save vfo for restore later
vfo = vfo_fixup(rig, vfo);
// there are some rigs that can't get VFOA freq while VFOB is transmitting
@ -1530,14 +1533,11 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
else
{
int rc2;
vfo_t curr_vfo;
if (!caps->set_vfo)
{
return -RIG_ENAVAIL;
}
curr_vfo = rig->state.current_vfo;
retcode = caps->set_vfo(rig, vfo);
if (retcode != RIG_OK)