kopia lustrzana https://github.com/Hamlib/Hamlib
Add split functions to FT1000MP models
ft1000mp_set_split_mode ft1000mp_get_split_mode ft100mp_get_split_freq_mode https://github.com/Hamlib/Hamlib/issues/1014pull/1022/head
rodzic
3dd9277e79
commit
871dcbe8a3
|
@ -115,8 +115,12 @@ static int ft1000mp_open(RIG *rig);
|
||||||
static int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
static int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
||||||
static int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
static int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||||
static int ft1000mp_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
static int ft1000mp_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
||||||
|
static int ft1000mp_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width);
|
||||||
|
static int ft1000mp_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width);
|
||||||
static int ft1000mp_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
|
static int ft1000mp_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
|
||||||
rmode_t mode, pbwidth_t width);
|
rmode_t mode, pbwidth_t width);
|
||||||
|
static int ft1000mp_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq,
|
||||||
|
rmode_t *mode, pbwidth_t *width);
|
||||||
static int ft1000mp_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq);
|
static int ft1000mp_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq);
|
||||||
static int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split,
|
static int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split,
|
||||||
vfo_t tx_vfo);
|
vfo_t tx_vfo);
|
||||||
|
@ -312,7 +316,7 @@ const struct rig_caps ft1000mp_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FT1000MP),
|
RIG_MODEL(RIG_MODEL_FT1000MP),
|
||||||
.model_name = "FT-1000MP",
|
.model_name = "FT-1000MP",
|
||||||
.mfg_name = "Yaesu",
|
.mfg_name = "Yaesu",
|
||||||
.version = "20211113.0",
|
.version = "20220421.0",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -424,7 +428,10 @@ const struct rig_caps ft1000mp_caps =
|
||||||
|
|
||||||
.set_split_freq = ft1000mp_set_split_freq,
|
.set_split_freq = ft1000mp_set_split_freq,
|
||||||
.get_split_freq = ft1000mp_get_split_freq,
|
.get_split_freq = ft1000mp_get_split_freq,
|
||||||
|
.set_split_mode = ft1000mp_set_split_mode,
|
||||||
|
.get_split_mode = ft1000mp_get_split_mode,
|
||||||
.set_split_freq_mode = ft1000mp_set_split_freq_mode,
|
.set_split_freq_mode = ft1000mp_set_split_freq_mode,
|
||||||
|
.get_split_freq_mode = ft1000mp_get_split_freq_mode,
|
||||||
.set_split_vfo = ft1000mp_set_split_vfo,
|
.set_split_vfo = ft1000mp_set_split_vfo,
|
||||||
.get_split_vfo = ft1000mp_get_split_vfo,
|
.get_split_vfo = ft1000mp_get_split_vfo,
|
||||||
|
|
||||||
|
@ -448,7 +455,7 @@ const struct rig_caps ft1000mpmkv_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FT1000MPMKV),
|
RIG_MODEL(RIG_MODEL_FT1000MPMKV),
|
||||||
.model_name = "MARK-V FT-1000MP",
|
.model_name = "MARK-V FT-1000MP",
|
||||||
.mfg_name = "Yaesu",
|
.mfg_name = "Yaesu",
|
||||||
.version = "20211014.0",
|
.version = "20220421.0",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -560,7 +567,10 @@ const struct rig_caps ft1000mpmkv_caps =
|
||||||
|
|
||||||
.set_split_freq = ft1000mp_set_split_freq,
|
.set_split_freq = ft1000mp_set_split_freq,
|
||||||
.get_split_freq = ft1000mp_get_split_freq,
|
.get_split_freq = ft1000mp_get_split_freq,
|
||||||
|
.set_split_mode = ft1000mp_set_split_mode,
|
||||||
|
.get_split_mode = ft1000mp_get_split_mode,
|
||||||
.set_split_freq_mode = ft1000mp_set_split_freq_mode,
|
.set_split_freq_mode = ft1000mp_set_split_freq_mode,
|
||||||
|
.get_split_freq_mode = ft1000mp_get_split_freq_mode,
|
||||||
.set_split_vfo = ft1000mp_set_split_vfo,
|
.set_split_vfo = ft1000mp_set_split_vfo,
|
||||||
.get_split_vfo = ft1000mp_get_split_vfo,
|
.get_split_vfo = ft1000mp_get_split_vfo,
|
||||||
|
|
||||||
|
@ -584,7 +594,7 @@ const struct rig_caps ft1000mpmkvfld_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD),
|
RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD),
|
||||||
.model_name = "MARK-V Field FT-1000MP",
|
.model_name = "MARK-V Field FT-1000MP",
|
||||||
.mfg_name = "Yaesu",
|
.mfg_name = "Yaesu",
|
||||||
.version = "20211014.0",
|
.version = "20220421.0",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -696,7 +706,10 @@ const struct rig_caps ft1000mpmkvfld_caps =
|
||||||
|
|
||||||
.set_split_freq = ft1000mp_set_split_freq,
|
.set_split_freq = ft1000mp_set_split_freq,
|
||||||
.get_split_freq = ft1000mp_get_split_freq,
|
.get_split_freq = ft1000mp_get_split_freq,
|
||||||
|
.set_split_mode = ft1000mp_set_split_mode,
|
||||||
|
.get_split_mode = ft1000mp_get_split_mode,
|
||||||
.set_split_freq_mode = ft1000mp_set_split_freq_mode,
|
.set_split_freq_mode = ft1000mp_set_split_freq_mode,
|
||||||
|
.get_split_freq_mode = ft1000mp_get_split_freq_mode,
|
||||||
.set_split_vfo = ft1000mp_set_split_vfo,
|
.set_split_vfo = ft1000mp_set_split_vfo,
|
||||||
.get_split_vfo = ft1000mp_get_split_vfo,
|
.get_split_vfo = ft1000mp_get_split_vfo,
|
||||||
|
|
||||||
|
@ -1781,11 +1794,56 @@ static int ft1000mp_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
RETURNFUNC(ft1000mp_set_freq(rig, RIG_VFO_B, tx_freq));
|
RETURNFUNC(ft1000mp_set_freq(rig, RIG_VFO_B, tx_freq));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ft1000mp_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
retval = rig_set_mode(rig, RIG_VFO_B, tx_mode, tx_width);
|
||||||
|
RETURNFUNC(retval);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ft1000mp_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width)
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
retval = rig_get_mode(rig, RIG_VFO_B, tx_mode, tx_width);
|
||||||
|
RETURNFUNC(retval);
|
||||||
|
}
|
||||||
|
|
||||||
static int ft1000mp_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
|
static int ft1000mp_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
|
||||||
rmode_t mode, pbwidth_t width)
|
rmode_t mode, pbwidth_t width)
|
||||||
{
|
{
|
||||||
// don't believe mode on VFOB can be different than mode on VFOA
|
int retval;
|
||||||
return ft1000mp_set_split_freq(rig, vfo, freq);
|
retval = rig_set_mode(rig, RIG_VFO_B, mode, width);
|
||||||
|
if (retval != RIG_OK)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: rig_set_mode failed: %s\n", __func__, rigerror(retval));
|
||||||
|
RETURNFUNC(retval);
|
||||||
|
}
|
||||||
|
retval = ft1000mp_set_split_freq(rig, vfo, freq);
|
||||||
|
if (retval == RIG_OK)
|
||||||
|
{
|
||||||
|
rig->state.cache.freqMainB = freq;
|
||||||
|
rig->state.cache.modeMainB = mode;
|
||||||
|
}
|
||||||
|
RETURNFUNC(retval);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ft1000mp_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq,
|
||||||
|
rmode_t *mode, pbwidth_t *width)
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
retval = rig_get_mode(rig, RIG_VFO_B, mode, width);
|
||||||
|
if (retval != RIG_OK)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: rig_set_mode failed: %s\n", __func__, rigerror(retval));
|
||||||
|
RETURNFUNC(retval);
|
||||||
|
}
|
||||||
|
retval = ft1000mp_get_split_freq(rig, vfo, freq);
|
||||||
|
if (retval == RIG_OK)
|
||||||
|
{
|
||||||
|
rig->state.cache.freqMainB = *freq;
|
||||||
|
rig->state.cache.modeMainB = *mode;
|
||||||
|
}
|
||||||
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ft1000mp_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
static int ft1000mp_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
|
|
Ładowanie…
Reference in New Issue