[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. b90cd8b8c70f7a4158801
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-03-23 13:09:28
|
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 b90cd8b8c70f7a4158801443fe9789fc075fe06b (commit) from 09474b17fb4b73fe1d4043a696c19ec555724dee (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 b90cd8b8c70f7a4158801443fe9789fc075fe06b Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Mar 23 08:08:21 2021 -0500 Fix MainB caching Satmode ops now maps Sub vfo to Sub_A https://github.com/Hamlib/Hamlib/issues/620 diff --git a/src/rig.c b/src/rig.c index c869dc1b..76c4b716 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1340,6 +1340,8 @@ static int set_cache_mode(RIG *rig, vfo_t vfo, mode_t mode, pbwidth_t width) // pick a sane default if (vfo == RIG_VFO_NONE || vfo == RIG_VFO_CURR) { vfo = RIG_VFO_A; } + if (vfo == RIG_VFO_SUB && rig->state.cache.satmode) { vfo = RIG_VFO_SUB_A; }; + switch (vfo) { case RIG_VFO_ALL: // we'll use NONE to reset all VFO caches @@ -1411,6 +1413,8 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) // pick a sane default if (vfo == RIG_VFO_NONE || vfo == RIG_VFO_CURR) { vfo = RIG_VFO_A; } + if (vfo == RIG_VFO_SUB && rig->state.cache.satmode) { vfo = RIG_VFO_SUB_A; }; + rig_debug(RIG_DEBUG_TRACE, "%s: set vfo=%s to freq=%.0f\n", __func__, rig_strvfo(vfo), freq); @@ -1496,6 +1500,9 @@ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, // pick a sane default if (vfo == RIG_VFO_CURR || vfo == RIG_VFO_NONE) { vfo = RIG_VFO_A; } + // If we're in satmode we map SUB to SUB_A + if (vfo == RIG_VFO_SUB && rig->state.cache.satmode) { vfo = RIG_VFO_SUB_A; }; + // VFO_C to be implemented switch (vfo) { @@ -1515,6 +1522,7 @@ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, case RIG_VFO_B: case RIG_VFO_SUB: + case RIG_VFO_MAIN_B: *freq = rig->state.cache.freqMainB; *mode = rig->state.cache.modeMainB; *width = rig->state.cache.widthMainB; ----------------------------------------------------------------------- Summary of changes: src/rig.c | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |