diff --git a/dummy/netrigctl.c b/dummy/netrigctl.c index 7e829e3a8..12fc092cf 100644 --- a/dummy/netrigctl.c +++ b/dummy/netrigctl.c @@ -578,11 +578,15 @@ static int netrigctl_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); +#if 0 // implement set_freq VFO later if it can be detected ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo); if (ret != RIG_OK) { return ret; } len = sprintf(cmd, "F%s %"FREQFMT"\n", vfostr, freq); +#else + len = sprintf(cmd, "F %"FREQFMT"\n", freq); +#endif ret = netrigctl_transaction(rig, cmd, len, buf); @@ -621,6 +625,7 @@ static int netrigctl_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) CHKSCN1ARG(num_sscanf(buf, "%"SCNfreq, freq)); +#if 0 // implement set_freq VFO later if it can be detected ret = read_string(&rig->state.rigport, buf, BUF_MAX, "\n", 1); if (ret <= 0) @@ -629,6 +634,7 @@ static int netrigctl_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } *vfotmp = rig_parse_vfo(buf); +#endif return RIG_OK; } diff --git a/src/rig.c b/src/rig.c index aa14d5a2e..08ce77666 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1274,6 +1274,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retcode != RIG_OK) { + rig_debug(RIG_DEBUG_ERR,"%s: set_vfo err %s\n", __func__, rigerror(retcode)); return retcode; } diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index f5889acdb..de4f4f965 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -241,7 +241,11 @@ declare_proto_rig(pause); */ static struct test_table test_list[] = { - { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, +#if 0 // implement set_freq VFO later if it can be detected +// { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, +#else + { 'F', "set_freq", ACTION(set_freq), ARG_IN1, "Frequency" }, +#endif { 'f', "get_freq", ACTION(get_freq), ARG_OUT, "Frequency", "VFO" }, { 'M', "set_mode", ACTION(set_mode), ARG_IN, "Mode", "Passband" }, { 'm', "get_mode", ACTION(get_mode), ARG_OUT, "Mode", "Passband" }, @@ -1923,15 +1927,17 @@ declare_proto_rig(set_freq) { freq_t freq; int retval; +#if 0 // implement set_freq VFO later if it can be detected char *fmt = "%"PRIll"%c"; +#endif CHKSCN1ARG(sscanf(arg1, "%"SCNfreq, &freq)); retval = rig_set_freq(rig, vfo, freq); if (retval == RIG_OK) { - fprintf(fout, "%s%c", rig_strvfo(vfo), resp_sep); - fprintf(fout, fmt, (int64_t)freq, resp_sep); + //fprintf(fout, "%s%c", rig_strvfo(vfo), resp_sep); + //fprintf(fout, fmt, (int64_t)freq, resp_sep); }