From e7530643a032ad7c92065cfab473859d84463731 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Wed, 3 Nov 2021 15:00:38 -0500 Subject: [PATCH] In rig.c set rxvfo and txvfo to current if currvfo is requested https://github.com/Hamlib/Hamlib/issues/838 --- src/rig.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/rig.c b/src/rig.c index d70fa8593..5d415d8b7 100644 --- a/src/rig.c +++ b/src/rig.c @@ -4697,6 +4697,15 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig, { rx_vfo = vfo_fixup(rig, rx_vfo, split); tx_vfo = vfo_fixup(rig, tx_vfo, split); + if (rx_vfo == RIG_VFO_CURR) + { + rx_vfo = rig->state.current_vfo; + } + if (tx_vfo == RIG_VFO_CURR) + { + tx_vfo = rig->state.tx_vfo; + } + rig_debug(RIG_DEBUG_VERBOSE, "%s: final rxvfo=%s, txvfo=%s\n", __func__, rig_strvfo(rx_vfo), rig_strvfo(tx_vfo)); } // set rig to the the requested RX VFO