[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. bcc80fef79ef77b424244
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-19 04:37:20
|
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 bcc80fef79ef77b4242441e71ba09d6cd70650c0 (commit) via 00cc6e848f9d26cc6a97f7b101c0ef88c57fe73d (commit) from 2eda4bf1a72116f07e8aab4032264d7dd755cdbf (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 bcc80fef79ef77b4242441e71ba09d6cd70650c0 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 22:35:59 2021 -0600 In newcat_set_cmd_validate make exception processing for VS command Return other cmds to full string comparison to validate data sent == data recvd diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 459a0912..2fb2bdb3 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9665,7 +9665,9 @@ int newcat_set_cmd_validate(RIG *rig) if (bytes > 0) { // if the first two chars match we are validated - if (strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } + if (strncmp(priv->cmd_str, "VS", 2) == 0 + && strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } + else if (strcmp(priv->cmd_str, priv->ret_data) == 0) { RETURNFUNC(RIG_OK); } else { rc = -RIG_EPROTO; } } commit 00cc6e848f9d26cc6a97f7b101c0ef88c57fe73d Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 22:30:49 2021 -0600 Fix double ;; in newcat_set_cmd_validate Only ask for freq from other vfo that may have been changed by band select diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b4e6e9c4..459a0912 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -866,12 +866,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (rig->state.current_vfo != vfo) { // then we need to change vfos, BS, and change back - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d%c;VS0;", - newcat_band_index(freq), cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d;VS0;", + newcat_band_index(freq)); if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d%c;VS1;", - newcat_band_index(freq), cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d;VS1;", + newcat_band_index(freq)); } else { @@ -951,6 +951,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_t tmp_freqA, tmp_freqB; rmode_t tmp_mode; pbwidth_t tmp_width; + rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA); rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB); rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width); @@ -972,8 +973,17 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_t tmp_freqA, tmp_freqB; rmode_t tmp_mode; pbwidth_t tmp_width; - rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA); - rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB); + + // we need to update some info that BS may have caused + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) + { + rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA); + } + else + { + rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqB); + } + rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width); rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |