Fix RIG_PTT_NONE detection from rigctl client by adding ptt_type to dumpcaps

https://github.com/Hamlib/Hamlib/issues/270
pull/281/head
Michael Black W9MDB 2020-05-30 16:59:36 -05:00
rodzic 5df9f81bef
commit 9ecc14f897
3 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -537,6 +537,11 @@ static int netrigctl_open(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %s\n", __func__, setting, value);
rig->caps->vfo_ops = strtol(value, NULL, 0);
}
else if (strcmp(setting, "ptt_type") == 0)
{
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %s\n", __func__, setting, value);
rig->caps->ptt_type = strtol(value, NULL, 0);
}
else
{
// not an error -- just a warning for backward compatibily

Wyświetl plik

@ -194,6 +194,10 @@ static vfo_t vfo_fixup(RIG *rig, vfo_t vfo)
{
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
if (vfo == RIG_VFO_CURR && rig->state.current_vfo == RIG_VFO_CURR)
{
vfo = RIG_VFO_A;
}
if (vfo == RIG_VFO_RX)
{
vfo = RIG_VFO_A;

Wyświetl plik

@ -4080,6 +4080,7 @@ declare_proto_rig(dump_state)
// protocol 1 fields can be multi-line -- just write the thing to allow for it
// backward compatible as new values will just generate warnings
fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops);
fprintf(fout, "ptt_type=0x%x\n", rig->caps->ptt_type);
fprintf(fout, "done\n");
#if 0 // why isn't this implemented? Does anybody care?