[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 92b7fc32ba54a89411b07
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-06-19 22:22:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 92b7fc32ba54a89411b07560acd07c6acdeb302b (commit) via 542e227f85df8ebbacd7937af81c5dd61eea5a41 (commit) via 0ec3d475b577475188f55405b247f4bad378e659 (commit) from a516e18ece89fc9d05484f23bd6f3d5a84121bf8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 92b7fc32ba54a89411b07560acd07c6acdeb302b Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jun 19 17:19:02 2020 -0500 Add get_split_vfo to ft1000mp.c and promote to stable diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 1a806461..c7b7fe80 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -215,9 +215,9 @@ const struct rig_caps ft1000mp_caps = RIG_MODEL(RIG_MODEL_FT1000MP), .model_name = "FT-1000MP", .mfg_name = "Yaesu", - .version = "20200618.0", + .version = "20200619.0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, @@ -326,6 +326,7 @@ const struct rig_caps ft1000mp_caps = .get_vfo = ft1000mp_get_vfo, /* get vfo */ .set_split_vfo = ft1000mp_set_split_vfo, + .get_split_vfo = ft1000mp_get_split_vfo, .get_rit = ft1000mp_get_rit, .set_rit = ft1000mp_set_rit, @@ -343,9 +344,9 @@ const struct rig_caps ft1000mpmkv_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKV), .model_name = "MARK-V FT-1000MP", .mfg_name = "Yaesu", - .version = "20200618.0", + .version = "20200619.0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, @@ -454,6 +455,7 @@ const struct rig_caps ft1000mpmkv_caps = .get_vfo = ft1000mp_get_vfo, /* get vfo */ .set_split_vfo = ft1000mp_set_split_vfo, + .get_split_vfo = ft1000mp_get_split_vfo, .get_rit = ft1000mp_get_rit, .set_rit = ft1000mp_set_rit, @@ -471,9 +473,9 @@ const struct rig_caps ft1000mpmkvfld_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD), .model_name = "MARK-V Field FT-1000MP", .mfg_name = "Yaesu", - .version = "20200618.0", + .version = "20200619.0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, @@ -582,6 +584,7 @@ const struct rig_caps ft1000mpmkvfld_caps = .get_vfo = ft1000mp_get_vfo, /* get vfo */ .set_split_vfo = ft1000mp_set_split_vfo, + .get_split_vfo = ft1000mp_get_split_vfo, .get_rit = ft1000mp_get_rit, .set_rit = ft1000mp_set_rit, @@ -1544,3 +1547,41 @@ int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) return RIG_OK; } + +/* + * get split + * + */ + +int ft1000mp_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) +{ + struct ft1000mp_priv_data *p; + int retval; + + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + + + p = (struct ft1000mp_priv_data *)rig->state.priv; + + /* Get flags for split status */ + retval = ft1000mp_get_update_data(rig, FT1000MP_NATIVE_UPDATE, + FT1000MP_STATUS_FLAGS_LENGTH); + + if (retval < 0) + { + return retval; + } + + if (p->update_data[0] & 0x01) + { + *tx_vfo = RIG_VFO_B; + *split = RIG_SPLIT_ON; + } + else + { + *tx_vfo = RIG_VFO_A; + *split = RIG_SPLIT_OFF; + } + + return RIG_OK; +} diff --git a/rigs/yaesu/ft1000mp.h b/rigs/yaesu/ft1000mp.h index f04cc18b..fe2fbdc4 100644 --- a/rigs/yaesu/ft1000mp.h +++ b/rigs/yaesu/ft1000mp.h @@ -203,6 +203,7 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq); int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); +int ft1000mp_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo); int ft1000mp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); /* select mode */ int ft1000mp_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); /* get mode */ commit 542e227f85df8ebbacd7937af81c5dd61eea5a41 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jun 19 06:55:56 2020 -0500 Remove retries for rigctl.c rig_open as they were never used and didn't work diff --git a/tests/rigctl.c b/tests/rigctl.c index 8d065630..901a7e81 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -153,7 +153,6 @@ int main(int argc, char *argv[]) char send_cmd_term = '\r'; /* send_cmd termination char */ int ext_resp = 0; char resp_sep = '\n'; - int i; while (1) { @@ -524,19 +523,7 @@ int main(int argc, char *argv[]) exit(0); } - i = 0; - - do // we'll try 5 times and sleep 200ms between tries - { - retcode = rig_open(my_rig); - - if (retcode != RIG_OK) - { - hl_usleep(200000); - rig_debug(RIG_DEBUG_TRACE, "%s: error opening rig, try#%d\n", __func__, i + 1); - } - } - while (retcode != RIG_OK && ++i < 5); + retcode = rig_open(my_rig); if (retcode != RIG_OK) { commit 0ec3d475b577475188f55405b247f4bad378e659 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jun 18 22:33:50 2020 -0500 Fix ft100mp set_split_vfo function diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index fe7e11eb..1a806461 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -1513,7 +1513,7 @@ static int ft1000mp_send_priv_cmd(RIG *rig, unsigned char ci) } -int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) +int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { // FT1000 transmits on A and receives on B ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft1000mp.c | 55 ++++++++++++++++++++++++++++++++++++++++++++------- rigs/yaesu/ft1000mp.h | 1 + tests/rigctl.c | 15 +------------- 3 files changed, 50 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |