[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 4ff31d008fd21f1768862
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-06-23 04:16:48
|
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 4ff31d008fd21f1768862a774dd1b93bdb2c56c3 (commit) from b380ed5dbf24da3333f9bbdd46a21903d00b4eab (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 4ff31d008fd21f1768862a774dd1b93bdb2c56c3 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jun 22 23:16:02 2020 -0500 Fix rigctl -o with rigctld https://github.com/Hamlib/Hamlib/issues/287 diff --git a/src/rig.c b/src/rig.c index 8ff9ca2a..257a3205 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1459,10 +1459,10 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) // If we're in vfo_mode then rigctld will do any VFO swapping we need if ((caps->targetable_vfo & RIG_TARGETABLE_FREQ) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo - || rig->state.vfo_opt == 1) - { - // If rig does not have set_vfo we need to change vfo - if (vfo == RIG_VFO_CURR && caps->set_vfo == NULL) + || (rig->state.vfo_opt == 1 && rig->caps->rig_model == RIG_MODEL_NETRIGCTL)) +{ + // If rig does not have set_vfo we need to change vfo + if (vfo == RIG_VFO_CURR && caps->set_vfo == NULL) { vfo = vfo_fixup(rig, RIG_VFO_A); rig_debug(RIG_DEBUG_TRACE, "%s: no set_vfo so vfo=%s\n", __func__, @@ -1540,29 +1540,29 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) /* VFO compensation */ if (rig->state.vfo_comp != 0.0) - { - *freq = (freq_t)(*freq / (1.0 + (double)rig->state.vfo_comp)); +{ + *freq = (freq_t)(*freq / (1.0 + (double)rig->state.vfo_comp)); } if (retcode == RIG_OK && (vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo)) - { - rig->state.current_freq = *freq; - } +{ + rig->state.current_freq = *freq; +} - if (rig->state.lo_freq != 0.0) - { - *freq += rig->state.lo_freq; - } +if (rig->state.lo_freq != 0.0) +{ + *freq += rig->state.lo_freq; +} - cache_ms = elapsed_ms(&(rig->state.cache.time_freq), ELAPSED_SET); - rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n", - __func__, cache_ms, rig_strvfo(vfo), *freq); - rig->state.cache.freq = *freq; - rig->state.cache.vfo_freq = vfo; +cache_ms = elapsed_ms(&(rig->state.cache.time_freq), ELAPSED_SET); + rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n", + __func__, cache_ms, rig_strvfo(vfo), *freq); + rig->state.cache.freq = *freq; + rig->state.cache.vfo_freq = vfo; - return retcode; + return retcode; } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |