[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 4b2d63f9f0c713a1c6fcd
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-16 14:53: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 4b2d63f9f0c713a1c6fcd67a6f23739338545663 (commit) from 174d4118977de3c461aaaedc929843b0e491b5ba (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 4b2d63f9f0c713a1c6fcd67a6f23739338545663 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 16 08:50:54 2021 -0600 Fix newcat_set_cmd_validate band change checking https://github.com/Hamlib/Hamlib/issues/510 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 5c2ba260..875f9342 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -352,7 +352,12 @@ static const yaesu_newcat_commands_t valid_commands[] = }; int valid_commands_count = sizeof(valid_commands) / sizeof( - yaesu_newcat_commands_t); + yaesu_newcat_commands_t); + +static void errmsg(int err, const char *func, const char *file, int line, char *s) +{ + rig_debug(RIG_DEBUG_ERR, "%s(%s:%d): %s: %s\b", __func__,file,line,s,rigerror(err)); +} /* * configuration Tokens @@ -726,6 +731,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (err < 0) { + errmsg(err, __func__, __FILE__, __LINE__, "newcat_set_vfo_from_alias"); return err; } @@ -775,6 +781,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (RIG_OK != (err = newcat_get_cmd(rig))) { + errmsg(err, __func__, __FILE__, __LINE__, "newcat_get_cmd"); return err; } @@ -785,6 +792,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (RIG_OK != (err = newcat_set_cmd(rig))) { + errmsg(err,__func__,__FILE__,__LINE__, "newcat_set_cmd failed"); return err; } } @@ -810,12 +818,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { - changing = newcat_band_index(freq) != rig->state.cache.freqMainA; + changing = newcat_band_index(freq) != newcat_band_index(rig->state.cache.freqMainA); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing); } else { - changing = newcat_band_index(freq) != rig->state.cache.freqMainB; + changing = newcat_band_index(freq) != newcat_band_index(rig->state.cache.freqMainB); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing); } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |