kopia lustrzana https://github.com/Hamlib/Hamlib
Only check for serial control line conflicts if PTT shares CAT port
rodzic
89ebe6bc84
commit
cd44a8d926
25
src/rig.c
25
src/rig.c
|
@ -471,23 +471,34 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
|
||||
rs->rigport.fd = -1;
|
||||
|
||||
if (rs->rigport.type.rig == RIG_PORT_SERIAL) {
|
||||
|
||||
if (rs->rigport.type.rig == RIG_PORT_SERIAL)
|
||||
{
|
||||
if (rs->rigport.parm.serial.rts_state != RIG_SIGNAL_UNSET &&
|
||||
(rs->pttport.type.ptt == RIG_PTT_SERIAL_RTS ||
|
||||
rs->rigport.parm.serial.handshake == RIG_HANDSHAKE_HARDWARE)) {
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot set RTS with PTT by RTS or hardware handshare \"%s\"\n",
|
||||
rs->rigport.parm.serial.handshake == RIG_HANDSHAKE_HARDWARE)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot set RTS with hardware handshake \"%s\"\n",
|
||||
rs->rigport.pathname);
|
||||
return -RIG_ECONF;
|
||||
}
|
||||
if (!strcmp(rs->pttport.pathname, rs->rigport.pathname))
|
||||
{
|
||||
/* check for control line conflicts */
|
||||
if (rs->rigport.parm.serial.rts_state != RIG_SIGNAL_UNSET &&
|
||||
rs->pttport.type.ptt == RIG_PTT_SERIAL_RTS)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot set RTS with PTT by RTS \"%s\"\n",
|
||||
rs->rigport.pathname);
|
||||
return -RIG_ECONF;
|
||||
}
|
||||
if (rs->rigport.parm.serial.dtr_state != RIG_SIGNAL_UNSET &&
|
||||
rs->pttport.type.ptt == RIG_PTT_SERIAL_DTR) {
|
||||
rs->pttport.type.ptt == RIG_PTT_SERIAL_DTR)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot set DTR with PTT by DTR \"%s\"\n",
|
||||
rs->rigport.pathname);
|
||||
return -RIG_ECONF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
status = port_open(&rs->rigport);
|
||||
if (status < 0)
|
||||
|
|
Ładowanie…
Reference in New Issue