Only check for serial control line conflicts if PTT shares CAT port

Hamlib-3.0
Bill Somerville 2014-10-14 01:33:22 +01:00
rodzic 89ebe6bc84
commit cd44a8d926
1 zmienionych plików z 57 dodań i 46 usunięć

Wyświetl plik

@ -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)