Fix ID5100 to not use 0x25 cmd when in dual watch - otherwise use x25 in normal mode

pull/1404/head
Mike Black W9MDB 2023-10-07 08:29:10 -05:00
rodzic 8a9776664e
commit f7f57ecc68
1 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -140,8 +140,8 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
{ {
unsigned char ackbuf[MAXFRAMELEN]; unsigned char ackbuf[MAXFRAMELEN];
int ack_len = sizeof(ackbuf), retval; int ack_len = sizeof(ackbuf), retval;
//struct rig_state *rs = &rig->state; struct rig_state *rs = &rig->state;
//struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
ENTERFUNC; ENTERFUNC;
@ -150,7 +150,8 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
if (vfo == RIG_VFO_A || vfo == RIG_VFO_B) if (vfo == RIG_VFO_A || vfo == RIG_VFO_B)
{ {
// then we need to turn off dual watch // then we need to turn off dual watch
// and 0x25 works in this mode
priv->x25cmdfails = 0;
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH, if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
0))) 0)))
{ {
@ -158,11 +159,15 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
} }
} }
else if (vfo == RIG_VFO_MAIN || vfo == RIG_VFO_SUB) else if (vfo == RIG_VFO_MAIN || vfo == RIG_VFO_SUB)
{
// x25 does not work in DUAL_WATCH mode
priv->x25cmdfails = 1;
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH, if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
1))) 1)))
{ {
RETURNFUNC2(retval); RETURNFUNC2(retval);
} }
}
int myvfo = S_MAIN; int myvfo = S_MAIN;