Fix rig_get_split_vfo -- was almost always using cache

pull/1532/head
Mike Black W9MDB 2024-03-25 14:46:26 -05:00
rodzic 624e00dcb4
commit dc375c6d00
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -5825,7 +5825,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig,
struct rig_cache *cachep = CACHE(rig); struct rig_cache *cachep = CACHE(rig);
int retcode; int retcode;
int cache_ms; int cache_ms;
int use_cache; int use_cache = 0;
if (CHECK_RIG_ARG(rig)) if (CHECK_RIG_ARG(rig))
{ {
@ -5854,6 +5854,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig,
if (caps->get_split_vfo == NULL || use_cache) if (caps->get_split_vfo == NULL || use_cache)
{ {
rig_debug(RIG_DEBUG_TRACE, "%s: ?get_split_vfo=%d use_cache=%d\n", __func__, caps->get_split_vfo != NULL, use_cache);
// if we can't get the vfo we will return whatever we have cached // if we can't get the vfo we will return whatever we have cached
*split = cachep->split; *split = cachep->split;
*tx_vfo = cachep->split_vfo; *tx_vfo = cachep->split_vfo;