From b8e315a5266af9d5a9548dd1b729c135c989ef0c Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Wed, 27 May 2020 23:44:18 -0500 Subject: [PATCH] Fix up rigctl_parse set_vfo_opt https://github.com/Hamlib/Hamlib/issues/259 --- tests/rigctl_parse.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index d42483dd8..5933bd01c 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -244,10 +244,11 @@ static struct test_table test_list[] = { #if 0 // implement set_freq VFO later if it can be detected // { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, + { 'f', "get_freq", ACTION(get_freq), ARG_OUT, "Frequency", "VFO" }, #else { 'F', "set_freq", ACTION(set_freq), ARG_IN1, "Frequency" }, #endif - { 'f', "get_freq", ACTION(get_freq), ARG_OUT, "Frequency", "VFO" }, + { 'f', "get_freq", ACTION(get_freq), ARG_OUT, "Frequency" }, { 'M', "set_mode", ACTION(set_mode), ARG_IN, "Mode", "Passband" }, { 'm', "get_mode", ACTION(get_mode), ARG_OUT, "Mode", "Passband" }, { 'I', "set_split_freq", ACTION(set_split_freq), ARG_IN, "TX Frequency" }, @@ -4527,9 +4528,7 @@ declare_proto_rig(set_vfo_opt) rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); CHKSCN1ARG(sscanf(arg1, "%d", &opt)); *vfo_opt = rig->state.vfo_opt = opt; - sprintf(cmdbuf, "( %d\n", opt); - write_block(&rig->state.rigport, cmdbuf, strlen(cmdbuf)); - return RIG_OK; + return rig_set_vfo_opt(rig, opt); } /* '0xf1'--halt rigctld daemon */