kopia lustrzana https://github.com/Hamlib/Hamlib
astyle parallel.c
rodzic
151a7059c5
commit
37f87c9b62
|
@ -681,11 +681,13 @@ int par_ptt_get(hamlib_port_t *p, ptt_t *pttx)
|
|||
status = par_read_control(p, &ctl);
|
||||
par_unlock(p);
|
||||
|
||||
if (status == RIG_OK) {
|
||||
if (status == RIG_OK)
|
||||
{
|
||||
*pttx = (ctl & PARPORT_CONTROL_INIT) &&
|
||||
!(ctl & PARPORT_CONTROL_STROBE) ?
|
||||
RIG_PTT_ON : RIG_PTT_OFF;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -719,10 +721,13 @@ int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx)
|
|||
int status;
|
||||
|
||||
status = par_read_data(p, ®);
|
||||
if (status == RIG_OK) {
|
||||
|
||||
if (status == RIG_OK)
|
||||
{
|
||||
*dcdx = reg & (1 << p->parm.parallel.pin) ?
|
||||
RIG_DCD_ON : RIG_DCD_OFF;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue