kopia lustrzana https://github.com/Hamlib/Hamlib
Add debug for RTS PTT
rodzic
281022447c
commit
4f3ad4f3da
|
@ -2076,6 +2076,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
||||||
|
|
||||||
case RIG_PTT_SERIAL_RTS:
|
case RIG_PTT_SERIAL_RTS:
|
||||||
|
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: PTT RTS\n", __func__);
|
||||||
/* when the PTT port is not the control port we want to free the
|
/* when the PTT port is not the control port we want to free the
|
||||||
port when PTT is reset and seize the port when PTT is set,
|
port when PTT is reset and seize the port when PTT is set,
|
||||||
this allows limited sharing of the PTT port between
|
this allows limited sharing of the PTT port between
|
||||||
|
@ -2084,6 +2085,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
||||||
&& rs->pttport.fd < 0
|
&& rs->pttport.fd < 0
|
||||||
&& RIG_PTT_OFF != ptt)
|
&& RIG_PTT_OFF != ptt)
|
||||||
{
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: PTT RTS debug#1\n", __func__);
|
||||||
|
|
||||||
rs->pttport.fd = ser_open(&rs->pttport);
|
rs->pttport.fd = ser_open(&rs->pttport);
|
||||||
|
|
||||||
|
@ -2103,10 +2105,12 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
||||||
|
|
||||||
if (RIG_OK != retcode)
|
if (RIG_OK != retcode)
|
||||||
{
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: ser_set_dtr retcode=%d\n", __func__, retcode);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: PTT RTS debug#2\n", __func__);
|
||||||
retcode = ser_set_rts(&rig->state.pttport, ptt != RIG_PTT_OFF);
|
retcode = ser_set_rts(&rig->state.pttport, ptt != RIG_PTT_OFF);
|
||||||
|
|
||||||
if (strcmp(rs->pttport.pathname, rs->rigport.pathname)
|
if (strcmp(rs->pttport.pathname, rs->rigport.pathname)
|
||||||
|
@ -2143,6 +2147,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
||||||
|
|
||||||
rig->state.cache.ptt = ptt;
|
rig->state.cache.ptt = ptt;
|
||||||
elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET);
|
elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET);
|
||||||
|
if (retcode != RIG_OK) rig_debug(RIG_DEBUG_ERR, "%s: return code=%d\n", __func__, retcode);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue