kopia lustrzana https://github.com/Hamlib/Hamlib
Use correct argument type for serial control line functions
The serial port line control functions take a boolean argument not a ptt_t argument. Changed usage in rig_open() to use a explicit zero instead of RIG_PTT_OFF value which only coincidentally happens to be zero.Hamlib-3.0
rodzic
0a5b00c58d
commit
ddb0a12403
|
@ -534,9 +534,9 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
{
|
||||
/* Needed on Linux because the kernel forces RTS/DTR at open */
|
||||
if (rs->pttport.type.ptt == RIG_PTT_SERIAL_DTR)
|
||||
status = ser_set_dtr(&rs->pttport, RIG_PTT_OFF);
|
||||
status = ser_set_dtr(&rs->pttport, 0);
|
||||
else if (rs->pttport.type.ptt == RIG_PTT_SERIAL_RTS)
|
||||
status = ser_set_rts(&rs->pttport, RIG_PTT_OFF);
|
||||
status = ser_set_rts(&rs->pttport, 0);
|
||||
}
|
||||
break;
|
||||
case RIG_PTT_PARALLEL:
|
||||
|
@ -692,14 +692,14 @@ int HAMLIB_API rig_close(RIG *rig)
|
|||
case RIG_PTT_RIG_MICDATA:
|
||||
break;
|
||||
case RIG_PTT_SERIAL_RTS:
|
||||
ser_set_rts(&rs->pttport, RIG_PTT_OFF);
|
||||
ser_set_rts(&rs->pttport, 0);
|
||||
if (rs->pttport.fd != rs->rigport.fd)
|
||||
{
|
||||
port_close(&rs->pttport, RIG_PORT_SERIAL);
|
||||
}
|
||||
break;
|
||||
case RIG_PTT_SERIAL_DTR:
|
||||
ser_set_dtr(&rs->pttport, RIG_PTT_OFF);
|
||||
ser_set_dtr(&rs->pttport, 0);
|
||||
if (rs->pttport.fd != rs->rigport.fd)
|
||||
{
|
||||
port_close(&rs->pttport, RIG_PORT_SERIAL);
|
||||
|
|
Ładowanie…
Reference in New Issue