pull/281/head
Michael Black 2020-06-01 09:08:15 -05:00
commit 6333a42558
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) else if (strcmp(setting, "ptt_type") == 0)
{ {
rig->caps->ptt_type = strtol(value, NULL, 0); ptt_type_t temp = (ptt_type_t)strtol(value, NULL, 0);
rig->state.pttport.type.ptt = rig->caps->ptt_type; if (RIG_PTT_RIG_MICDATA == rig->state.pttport.type.ptt && RIG_PTT_NONE == temp)
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting, rig->caps->ptt_type); {
/*
* 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 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 // protocol 1 fields can be multi-line -- just write the thing to allow for it
// backward compatible as new values will just generate warnings // backward compatible as new values will just generate warnings
fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops); fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops);
fprintf(fout, "ptt_type=0x%x\n", fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt);
rig->caps->ptt_type == RIG_PTT_NONE ? RIG_PTT_NONE : RIG_PTT_RIG_MICDATA);
fprintf(fout, "done\n"); fprintf(fout, "done\n");
#if 0 // why isn't this implemented? Does anybody care? #if 0 // why isn't this implemented? Does anybody care?