Merge branch 'remote-ptt-type' of git://git.code.sf.net/u/bsomervi/hamlib

https://github.com/Hamlib/Hamlib/issues/270
pull/281/head
Michael Black W9MDB 2020-06-01 08:58:15 -05:00
commit c488ddc904
2 zmienionych plików z 12 dodań i 5 usunięć

Wyświetl plik

@ -539,9 +539,17 @@ static int netrigctl_open(RIG *rig)
}
else if (strcmp(setting, "ptt_type") == 0)
{
rig->caps->ptt_type = strtol(value, NULL, 0);
rig->state.pttport.type.ptt = rig->caps->ptt_type;
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting, rig->caps->ptt_type);
ptt_type_t temp = (ptt_type_t)strtol(value, NULL, 0);
if (RIG_PTT_RIG_MICDATA == rig->state.pttport.type.ptt && RIG_PTT_NONE == temp)
{
/*
* remote PTT must always be RIG_PTT_RIG_MICDATA
* if there is any PTT capability and we have not
* locally overridden it
*/
rig->state.pttport.type.ptt = temp;
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting, rig->state.pttport.type.ptt);
}
}
else
{

Wyświetl plik

@ -4080,8 +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 == RIG_PTT_NONE ? RIG_PTT_NONE : RIG_PTT_RIG_MICDATA);
fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt);
fprintf(fout, "done\n");
#if 0 // why isn't this implemented? Does anybody care?