pull/252/head
Michael Black 2020-05-13 17:47:32 -05:00
commit e52b3e762d
3 zmienionych plików z 16 dodań i 3 usunięć

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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);
}