[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. c93da3c5d43957a4df93c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-20 23:27:59
|
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 c93da3c5d43957a4df93c2af976e573105bb2db4 (commit) from 5a9daf5f0e7fd416c5125e9336775d2936980f28 (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 c93da3c5d43957a4df93c2af976e573105bb2db4 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 17:27:41 2021 -0600 Fix FT450 FB command to swap VFOs diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index fe1060b6..22c38158 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -991,8 +991,25 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // cppcheck-suppress * - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, - priv->width_frequency, (int64_t)freq, cat_term); + if (RIG_MODEL_FT450 == caps->rig_model) + { + if (c == 'B') + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;F%c%0*"PRIll"%c;VS0;", c, + priv->width_frequency, (int64_t)freq, cat_term); + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, + priv->width_frequency, (int64_t)freq, cat_term); + } + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, + priv->width_frequency, (int64_t)freq, cat_term); + } + rig_debug(RIG_DEBUG_TRACE, "%s:%d cmd_str = %s\n", __func__, __LINE__, priv->cmd_str); @@ -1279,7 +1296,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo) rig_strvfo(vfo)); // we can't change VFO while transmitting - if (rig->state.cache.ptt == RIG_PTT_ON) return RIG_OK; + if (rig->state.cache.ptt == RIG_PTT_ON) { return RIG_OK; } if (!newcat_valid_command(rig, command)) { @@ -9661,7 +9678,8 @@ int newcat_set_cmd_validate(RIG *rig) // for the BS command we can only run it once // so we'll assume it worked // maybe Yaeus will make this command more intelligent - if (strstr(priv->cmd_str,"BS")) return RIG_OK; + if (strstr(priv->cmd_str, "BS")) { return RIG_OK; } + // if the first two chars match we are validated if (strncmp(priv->cmd_str, "VS", 2) == 0 && strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |