kopia lustrzana https://github.com/Hamlib/Hamlib
Add split funcions to IC-F8101
rodzic
72dac9a573
commit
90400c0d9f
|
@ -229,12 +229,74 @@ int icf8101_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int icf8101_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
|
{
|
||||||
|
return rig_set_freq(rig, RIG_VFO_B, tx_freq);
|
||||||
|
}
|
||||||
|
|
||||||
|
int icf8101_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
|
{
|
||||||
|
return rig_get_freq(rig, RIG_VFO_B, tx_freq);
|
||||||
|
}
|
||||||
|
|
||||||
|
int icf8101_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
|
||||||
|
rmode_t mode, pbwidth_t width)
|
||||||
|
{
|
||||||
|
rig_set_freq(rig, RIG_VFO_B, tx_freq);
|
||||||
|
return rig_set_mode(rig, RIG_VFO_B, mode, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int icf8101_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
|
||||||
|
rmode_t *mode, pbwidth_t *width)
|
||||||
|
{
|
||||||
|
rig_get_freq(rig, RIG_VFO_B, tx_freq);
|
||||||
|
return rig_get_mode(rig, RIG_VFO_B, mode, width);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int icf8101_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
||||||
|
{
|
||||||
|
unsigned char cmdbuf[3];
|
||||||
|
int ack_len;
|
||||||
|
unsigned char ackbuf[MAXFRAMELEN];
|
||||||
|
|
||||||
|
cmdbuf[0] = 0x03;
|
||||||
|
cmdbuf[1] = 0x17;
|
||||||
|
cmdbuf[2] = split;
|
||||||
|
return icom_transaction(rig, 0x1a, 0x05, cmdbuf, sizeof(cmdbuf), ackbuf,
|
||||||
|
&ack_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
int icf8101_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
int ack_len;
|
||||||
|
unsigned char ackbuf[MAXFRAMELEN];
|
||||||
|
unsigned char cmdbuf[2];
|
||||||
|
|
||||||
|
cmdbuf[0] = 0x03;
|
||||||
|
cmdbuf[1] = 0x17;
|
||||||
|
retval = icom_transaction(rig, 0x1a, 0x05, cmdbuf, sizeof(cmdbuf), ackbuf,
|
||||||
|
&ack_len);
|
||||||
|
|
||||||
|
if (retval == RIG_OK && ack_len >= 1)
|
||||||
|
{
|
||||||
|
dump_hex(ackbuf, ack_len);
|
||||||
|
*split = ackbuf[0] == 1;
|
||||||
|
*tx_vfo = RIG_VFO_B;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const struct rig_caps icf8101_caps =
|
const struct rig_caps icf8101_caps =
|
||||||
{
|
{
|
||||||
RIG_MODEL(RIG_MODEL_ICF8101),
|
RIG_MODEL(RIG_MODEL_ICF8101),
|
||||||
.model_name = "IC-F8101",
|
.model_name = "IC-F8101",
|
||||||
.mfg_name = "Icom",
|
.mfg_name = "Icom",
|
||||||
.version = BACKEND_VER ".1",
|
.version = BACKEND_VER ".1a",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_BETA,
|
.status = RIG_STATUS_BETA,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -321,6 +383,13 @@ const struct rig_caps icf8101_caps =
|
||||||
.get_mode = icf8101_get_mode,
|
.get_mode = icf8101_get_mode,
|
||||||
.set_mode = icf8101_set_mode,
|
.set_mode = icf8101_set_mode,
|
||||||
|
|
||||||
|
.set_split_freq = icf8101_set_split_freq,
|
||||||
|
.get_split_freq = icf8101_get_split_freq,
|
||||||
|
.set_split_vfo = icf8101_set_split_vfo,
|
||||||
|
.get_split_vfo = icf8101_get_split_vfo,
|
||||||
|
.set_split_freq_mode = icf8101_set_split_freq_mode,
|
||||||
|
.get_split_freq_mode = icf8101_get_split_freq_mode,
|
||||||
|
|
||||||
.set_ptt = icom_set_ptt,
|
.set_ptt = icom_set_ptt,
|
||||||
.get_ptt = icom_get_ptt,
|
.get_ptt = icom_get_ptt,
|
||||||
.set_vfo = icom_set_vfo,
|
.set_vfo = icom_set_vfo,
|
||||||
|
|
Ładowanie…
Reference in New Issue