diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 03f5b1f1b..4f4329931 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -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_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_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, 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_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); @@ -312,7 +316,7 @@ const struct rig_caps ft1000mp_caps = RIG_MODEL(RIG_MODEL_FT1000MP), .model_name = "FT-1000MP", .mfg_name = "Yaesu", - .version = "20211113.0", + .version = "20220421.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -424,7 +428,10 @@ const struct rig_caps ft1000mp_caps = .set_split_freq = ft1000mp_set_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, + .get_split_freq_mode = ft1000mp_get_split_freq_mode, .set_split_vfo = ft1000mp_set_split_vfo, .get_split_vfo = ft1000mp_get_split_vfo, @@ -448,7 +455,7 @@ const struct rig_caps ft1000mpmkv_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKV), .model_name = "MARK-V FT-1000MP", .mfg_name = "Yaesu", - .version = "20211014.0", + .version = "20220421.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -560,7 +567,10 @@ const struct rig_caps ft1000mpmkv_caps = .set_split_freq = ft1000mp_set_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, + .get_split_freq_mode = ft1000mp_get_split_freq_mode, .set_split_vfo = ft1000mp_set_split_vfo, .get_split_vfo = ft1000mp_get_split_vfo, @@ -584,7 +594,7 @@ const struct rig_caps ft1000mpmkvfld_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD), .model_name = "MARK-V Field FT-1000MP", .mfg_name = "Yaesu", - .version = "20211014.0", + .version = "20220421.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -696,7 +706,10 @@ const struct rig_caps ft1000mpmkvfld_caps = .set_split_freq = ft1000mp_set_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, + .get_split_freq_mode = ft1000mp_get_split_freq_mode, .set_split_vfo = ft1000mp_set_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)); } +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, rmode_t mode, pbwidth_t width) { - // don't believe mode on VFOB can be different than mode on VFOA - return ft1000mp_set_split_freq(rig, vfo, freq); + int retval; + 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)