Fix ICOM request for VFOB info when VFOB is active vfo

https://github.com/Hamlib/Hamlib/issues/806
pull/809/head
Mike Black W9MDB 2021-09-21 12:17:17 -05:00
rodzic 4c0633bf62
commit a94dcddcf4
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -2193,8 +2193,10 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
&& rig->caps->rig_model != RIG_MODEL_IC7800)
{
int vfosel = 0x00;
vfo_t vfoask = vfo_fixup(rig, vfo, 0);
vfo_t vfocurr = vfo_fixup(rig, rig->state.current_vfo, 0);
if (vfo & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B)) { vfosel = 0x01; }
if (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
@ -6947,6 +6949,7 @@ int icom_set_parm(RIG *rig, setting_t parm, value_t val)
rig_strparm(parm));
RETURNFUNC(-RIG_EINVAL);
}
RETURNFUNC(-RIG_EINVAL);
}

Wyświetl plik

@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20210911"
#define BACKEND_VER "20210921"
#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)