[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. c9cfd40e91a225184f8e9
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-09-28 15:30:37
|
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 c9cfd40e91a225184f8e9423cd93015c94a57385 (commit) via 5fbb58f3ee948f9c1df0782ff17af9f36c9699e8 (commit) from 1e1e2a5fbd05b7134e563efc6654c2565a18eb00 (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 c9cfd40e91a225184f8e9423cd93015c94a57385 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Sep 28 09:11:14 2020 -0500 Update newcat.c for FTDX101D MS command now using VFO selection https://github.com/Hamlib/Hamlib/issues/385 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index daeef4de..bbdad637 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -2527,6 +2527,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) int scale; int fpf; char main_sub_vfo = '0'; + char *format; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -2538,7 +2539,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return err; } - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & RIG_TARGETABLE_PURE) { main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0'; } @@ -2684,10 +2685,22 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { return -RIG_ENAVAIL; } + if (newcat_is_rig(rig, RIG_MODEL_TS890S)) // new format for the command with VFO selection + { + format = "MS0%d;"; + if (vfo == RIG_VFO_SUB) + { + format = "MS1%d"; + } + } + else + { + format = "MS%d"; + } switch (val.i) { - case RIG_METER_ALC: snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS1;"); + case RIG_METER_ALC: snprintf(priv->cmd_str, sizeof(priv->cmd_str), format, 1); break; case RIG_METER_PO: @@ -2697,21 +2710,21 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } else { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS2;"); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), format, 2); } break; - case RIG_METER_SWR: snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS3;"); + case RIG_METER_SWR: snprintf(priv->cmd_str, sizeof(priv->cmd_str), format, 3); break; - case RIG_METER_COMP: snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS0;"); + case RIG_METER_COMP: snprintf(priv->cmd_str, sizeof(priv->cmd_str), format, 0); break; - case RIG_METER_IC: snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS4;"); + case RIG_METER_IC: snprintf(priv->cmd_str, sizeof(priv->cmd_str), format, 4); break; - case RIG_METER_VDD: snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS5;"); + case RIG_METER_VDD: snprintf(priv->cmd_str, sizeof(priv->cmd_str), format, 5); break; default: return -RIG_EINVAL; commit 5fbb58f3ee948f9c1df0782ff17af9f36c9699e8 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Sep 28 08:54:19 2020 -0500 Add RIG_TARGETABLE_PURE to ftdx101 and ftdx5000 Change newcat_get_level and set_level check to RIG_TARGETABLE_PURE https://github.com/Hamlib/Hamlib/issues/385 diff --git a/rigs/yaesu/ft5000.c b/rigs/yaesu/ft5000.c index 5e08ae29..bdb36ada 100644 --- a/rigs/yaesu/ft5000.c +++ b/rigs/yaesu/ft5000.c @@ -87,7 +87,7 @@ const struct rig_caps ftdx5000_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1000), .vfo_ops = FTDX5000_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_TONE, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_PURE, .transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, @@ -422,7 +422,7 @@ const struct rig_caps ftdx101d_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1000), .vfo_ops = FTDX5000_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_PURE, .transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 7814c936..daeef4de 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3060,7 +3060,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return err; } - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & RIG_TARGETABLE_PURE) { main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0'; } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 0fef21fd..b2c64f3c 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20200927" +#define NEWCAT_VER "20200928" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft5000.c | 4 ++-- rigs/yaesu/newcat.c | 29 +++++++++++++++++++++-------- rigs/yaesu/newcat.h | 2 +- 3 files changed, 24 insertions(+), 11 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |