Fix ID5100 to use Main=Tx, Sub=Rx when split is requested

https://github.com/Hamlib/Hamlib/issues/1218
pull/1404/head
Mike Black W9MDB 2023-10-07 08:20:41 -05:00
rodzic 4175929a48
commit 8a9776664e
1 zmienionych plików z 8 dodań i 14 usunięć

Wyświetl plik

@ -182,26 +182,20 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
{
//unsigned char ackbuf[MAXFRAMELEN];
//int ack_len = sizeof(ackbuf), icvfo, retval;
int retval;
//struct rig_state *rs = &rig->state;
//struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
if (vfo == RIG_VFO_CURR || vfo == RIG_VFO_A || vfo == RIG_VFO_B)
// ID5100 puts tx on Main an rx on Sub
if (tx_vfo == RIG_VFO_A || tx_vfo == RIG_VFO_MAIN)
{
return icom_set_vfo(rig, vfo);
}
if (vfo == RIG_VFO_MAIN)
{
retval = RIG_OK;
// we must set RX vfo to SUB
retval = rig_set_vfo(rig, RIG_VFO_SUB);
}
else
{
retval = RIG_OK;
rig_debug(RIG_DEBUG_ERR, "%s: ID5100 split must have Tx=Main=Tx, Rx=Sub, got Tx=%s, Rx=%s\n", __func__, rig_strvfo(tx_vfo), rig_strvfo(vfo));
retval = -RIG_EINVAL;
}
return retval;
@ -222,7 +216,7 @@ const struct rig_caps id5100_caps =
RIG_MODEL(RIG_MODEL_ID5100),
.model_name = "ID-5100",
.mfg_name = "Icom",
.version = BACKEND_VER ".4",
.version = BACKEND_VER ".5",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_MOBILE,