Fix incorrect setting of VFOA when VFOB requested using vfo_opt mode

Only affected rigs that were not (caps->targetable_vfo & RIG_TARGETABLE_FREQ) like the dummy rig
https://github.com/Hamlib/Hamlib/issues/284
pull/290/head
Michael Black W9MDB 2020-06-06 16:03:16 -05:00
rodzic 4fc306ce08
commit 1cbdc5a7ea
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -1354,7 +1354,9 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
curr_vfo = rig->state.current_vfo;
retcode = caps->set_vfo(rig, vfo);
vfo = rig->state.current_vfo; // can't call get_vfo since Icoms don't have it
// why is the line below here?
// it's causing set_freq on the wrong vfo
//vfo = rig->state.current_vfo; // can't call get_vfo since Icoms don't have it
if (retcode != RIG_OK)
{
@ -1995,6 +1997,7 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
{
rig->state.current_vfo = vfo;
rig->state.cache.vfo = vfo;
rig_debug(RIG_DEBUG_TRACE, "%s: rig->state.current_vfo=%s\n", __func__, rig_strvfo(vfo));
}
else
{