mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Fix rigctl/rigctld "V VFOA" protocol error
4.0 rigctld now works with 3.3 rigctl client and 4.0 rigctl client https://github.com/Hamlib/Hamlib/issues/246
This commit is contained in:
parent
b6824cdcb1
commit
545081c8d4
@ -724,7 +724,7 @@ static int netrigctl_set_vfo(RIG *rig, vfo_t vfo)
|
||||
if (ret != RIG_OK) { return ret; }
|
||||
|
||||
len = sprintf(cmd, "V%s %s\n", vfostr, rig_strvfo(vfo));
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd='%s'\n", __func__, cmd);
|
||||
ret = netrigctl_transaction(rig, cmd, len, buf);
|
||||
|
||||
if (ret > 0)
|
||||
|
10
src/rig.c
10
src/rig.c
@ -1274,7 +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));
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: set_vfo err %s\n", __func__, rigerror(retcode));
|
||||
return retcode;
|
||||
}
|
||||
|
||||
@ -1830,7 +1830,13 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
|
||||
|
||||
// we need to update our internal freq to avoid getting detected as twiddling
|
||||
// we only get the freq if we set the vfo OK
|
||||
if (retcode == RIG_OK && caps->get_freq) { retcode = rig_get_freq(rig, vfo, &curr_freq); }
|
||||
if (retcode == RIG_OK && caps->get_freq)
|
||||
{
|
||||
retcode = rig_get_freq(rig, vfo, &curr_freq);
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: retcode from rig_get_freq = %s\n", __func__,
|
||||
rigerror(retcode));
|
||||
}
|
||||
|
||||
|
||||
// expire several cached items when we switch VFOs
|
||||
elapsed_ms(&rig->state.cache.time_vfo, ELAPSED_INVALIDATE);
|
||||
|
@ -281,7 +281,9 @@ static struct test_table test_list[] =
|
||||
{ 0x91, "get_ctcss_sql", ACTION(get_ctcss_sql), ARG_OUT, "CTCSS Sql" },
|
||||
{ 0x92, "set_dcs_sql", ACTION(set_dcs_sql), ARG_IN, "DCS Sql" },
|
||||
{ 0x93, "get_dcs_sql", ACTION(get_dcs_sql), ARG_OUT, "DCS Sql" },
|
||||
{ 'V', "set_vfo", ACTION(set_vfo), ARG_IN | ARG_NOVFO | ARG_OUT, "VFO" },
|
||||
//
|
||||
//{ 'V', "set_vfo", ACTION(set_vfo), ARG_IN | ARG_NOVFO | ARG_OUT, "VFO" },
|
||||
{ 'V', "set_vfo", ACTION(set_vfo), ARG_IN | ARG_NOVFO, "VFO" },
|
||||
{ 'v', "get_vfo", ACTION(get_vfo), ARG_OUT, "VFO" },
|
||||
{ 'T', "set_ptt", ACTION(set_ptt), ARG_IN, "PTT" },
|
||||
{ 't', "get_ptt", ACTION(get_ptt), ARG_OUT, "PTT" },
|
||||
@ -2113,6 +2115,7 @@ declare_proto_rig(set_vfo)
|
||||
vfo = rig_parse_vfo(arg1);
|
||||
retval = rig_set_vfo(rig, vfo);
|
||||
|
||||
#if 0 // see if we can make this dynamic
|
||||
if (retval == RIG_OK)
|
||||
{
|
||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
||||
@ -2122,6 +2125,7 @@ declare_proto_rig(set_vfo)
|
||||
|
||||
fprintf(fout, "%s%c", rig_strvfo(vfo), resp_sep);
|
||||
}
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user