Fix MICDATA ptt with rigctld and the few rigs which needs this -- e.g. TS-590, TS-480, TS-890, TS-990. VX-1700. ICF-8101

https://github.com/Hamlib/Hamlib/issues/1033
pull/1042/head
Mike Black W9MDB 2022-05-20 09:06:17 -05:00
rodzic f6d5b7e3c6
commit c9d31337b9
3 zmienionych plików z 4 dodań i 5 usunięć

Wyświetl plik

@ -681,8 +681,9 @@ static int netrigctl_open(RIG *rig)
else if (strcmp(setting, "ptt_type") == 0)
{
ptt_type_t temp = (ptt_type_t)strtol(value, NULL, 0);
rig_debug(RIG_DEBUG_ERR, "%s: ptt_type='%s'(%d)\n", __func__, value, temp);
if (RIG_PTT_RIG_MICDATA == rig->state.pttport.type.ptt && RIG_PTT_NONE == temp)
if (RIG_PTT_RIG_MICDATA == rig->state.pttport.type.ptt || temp == RIG_PTT_RIG_MICDATA)
{
/*
* remote PTT must always be RIG_PTT_RIG_MICDATA
@ -696,6 +697,7 @@ static int netrigctl_open(RIG *rig)
}
else
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt_type= %d\n", __func__, temp);
rig->state.pttport.type.ptt = temp;
rig->caps->ptt_type = temp;
}

Wyświetl plik

@ -2759,14 +2759,11 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
switch (rig->state.pttport.type.ptt)
{
case RIG_PTT_RIG:
#if 0 // https://github.com/Hamlib/Hamlib/issues/998 -- this is interfering with rigctld and MICDATA rigs
if (ptt == RIG_PTT_ON_MIC || ptt == RIG_PTT_ON_DATA)
{
ptt = RIG_PTT_ON;
}
#endif
/* fall through */
case RIG_PTT_RIG_MICDATA:
if (caps->set_ptt == NULL)

Wyświetl plik

@ -4384,7 +4384,7 @@ declare_proto_rig(dump_state)
{
fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops);
fprintf(fout, "ptt_type=0x%x\n",
rig->state.pttport.type.ptt == RIG_PTT_NONE ? RIG_PTT_NONE : RIG_PTT_RIG);
rig->state.pttport.type.ptt);
fprintf(fout, "targetable_vfo=0x%x\n", rig->caps->targetable_vfo);
fprintf(fout, "has_set_vfo=%d\n", rig->caps->set_vfo != NULL);
fprintf(fout, "has_get_vfo=%d\n", rig->caps->get_vfo != NULL);