Fix icom.c get_mode to not ask for unselected VFO when VFO_CURR is requested

https://github.com/Hamlib/Hamlib/issues/806
pull/809/head
Mike Black W9MDB 2021-09-22 10:40:56 -05:00
rodzic 0806896e3b
commit 421c6e7c4e
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -2196,7 +2196,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
vfo_t vfoask = vfo_fixup(rig, vfo, 0);
vfo_t vfocurr = vfo_fixup(rig, rig->state.current_vfo, 0);
if (vfoask != vfocurr) { vfosel = 0x01; }
if (vfo != RIG_VFO_CURR && vfoask != vfocurr) { vfosel = 0x01; }
// use cache for the non-selected VFO -- can't get it by VFO
// this avoids vfo swapping but accurate answers for these rigs

Wyświetl plik

@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20210921"
#define BACKEND_VER "20210922"
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)