kopia lustrzana https://github.com/Hamlib/Hamlib
Fix ID5100 to not use 0x25 cmd when in dual watch - otherwise use x25 in normal mode
rodzic
8a9776664e
commit
f7f57ecc68
|
@ -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;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue