From 59211b6a5881285a0dc2070f25ddb1cfbbe520a8 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Tue, 17 May 2022 07:49:44 -0500 Subject: [PATCH] Fix mode=NONE in rig_set_mode --- src/rig.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rig.c b/src/rig.c index 1d78b95e5..d0af7a0ed 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2105,8 +2105,11 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC2(-RIG_ENAVAIL); } - if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } - else if (mode == RIG_MODE_NONE) // the we just use the current mode to set width + if (vfo == RIG_VFO_CURR) + { + vfo = rig->state.current_vfo; + } + if (mode == RIG_MODE_NONE) // the we just use the current mode to set width { pbwidth_t twidth; rig_get_mode(rig, vfo, &mode, &twidth);