[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 174d4118977de3c461aaa
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-16 13:39:45
|
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 174d4118977de3c461aaaedc929843b0e491b5ba (commit) from f2b8096529a0a659a49337d0188fcc19883282b5 (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 174d4118977de3c461aaaedc929843b0e491b5ba Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 16 07:38:22 2021 -0600 Restrict newcat_set_cmd_validate BS to only rigs with get_vfo and set_vfo https://github.com/Hamlib/Hamlib/issues/510 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index e236403f..5c2ba260 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -822,7 +822,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (newcat_valid_command(rig, "BS") && changing // remove the split check here -- hopefully works OK //&& !rig->state.cache.split - && !is_ft891) // 891 does not remember bandwidth so don't do this + && !is_ft891 // 891 does not remember bandwidth so don't do this + && rig->caps->get_vfo!=NULL && rig->caps->set_vfo!=NULL) // gotta' have get_vfo too { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c", newcat_band_index(freq), cat_term); @@ -874,7 +875,10 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_A : RIG_VFO_B); } - if (err != RIG_OK) { return err; } + if (err != RIG_OK) { + rig_debug(RIG_DEBUG_ERR, "%s: rig_set_vfo failed: %s\n", __func__, rigerror(err)); + return err; + } // after band select re-read things -- may not have to change anything freq_t tmp_freqA, tmp_freqB; diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 3033e920..dfa3bdb5 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210115" +#define NEWCAT_VER "20210116" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 8 ++++++-- rigs/yaesu/newcat.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |