In rig.c do not override curr_vfo if it gets set by the backend

https://github.com/Hamlib/Hamlib/issues/853
pull/875/head
Mike Black W9MDB 2021-11-05 17:23:10 -05:00
rodzic ac4c59232d
commit 6ca9844196
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -1041,11 +1041,13 @@ int HAMLIB_API rig_open(RIG *rig)
{
rs->tx_vfo = rs->current_vfo;
}
else // vfo fails so set some sensible defaults
else // no get_vfo so set some sensible defaults
{
//int backend_num = RIG_BACKEND_NUM(rig->caps->rig_model);
rs->tx_vfo = RIG_VFO_TX;
rs->current_vfo = RIG_VFO_CURR;
// If we haven't gotten the vfo by now we will default to VFO_CURR
if (rs->current_vfo == RIG_VFO_NONE) rs->current_vfo = RIG_VFO_CURR;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo_curr=%s, tx_vfo=%s\n", __func__, rig_strvfo(rs->current_vfo), rig_strvfo(rs->tx_vfo));
#if 0 // done in the back end