[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 14493d4df5a26d606d3a1
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-15 23:41:14
|
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 14493d4df5a26d606d3a145462eca7a759da1aee (commit) from a7b9620f910e2270caca7a2381d200615560bbcc (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 14493d4df5a26d606d3a145462eca7a759da1aee Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 15 17:39:37 2021 -0600 newcat.c make band_index vfo check work for both VFOS https://github.com/Hamlib/Hamlib/issues/510 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 38116954..ded0e20e 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -842,7 +842,15 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (err != RIG_OK) { return err; } - err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_SUB : RIG_VFO_MAIN); + if (rig->state.vfo_list & RIG_VFO_MAIN) + { + err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_SUB : RIG_VFO_MAIN); + } + else + { + err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_B : RIG_VFO_A); + } + if (err != RIG_OK) { return err; } @@ -854,7 +862,14 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } // switch back to the starting vfo - err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_MAIN : RIG_VFO_SUB); + if (rig->state.vfo_list & RIG_VFO_MAIN) + { + err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_MAIN : RIG_VFO_SUB); + } + else + { + err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_A : RIG_VFO_B); + } if (err != RIG_OK) { return err; } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |