Finish all port initialization before allowing I/O.

pull/1568/head
George Baltz N3GB 2024-06-15 11:03:58 -04:00
rodzic d1520aa166
commit 697904c882
1 zmienionych plików z 21 dodań i 21 usunięć

Wyświetl plik

@ -521,6 +521,27 @@ int HAMLIB_API rot_open(ROT *rot)
add_opened_rot(rot);
if (rotp->type.rig != RIG_PORT_NETWORK && rotp->type.rig != RIG_PORT_UDP_NETWORK)
{
if (rotp->parm.serial.dtr_state == RIG_SIGNAL_ON)
{
ser_set_dtr(rotp, 1);
}
else
{
ser_set_dtr(rotp, 0);
}
if (rotp->parm.serial.rts_state == RIG_SIGNAL_ON)
{
ser_set_rts(rotp, 1);
}
else
{
ser_set_rts(rotp, 0);
}
}
rs->comm_state = 1;
/*
@ -555,27 +576,6 @@ int HAMLIB_API rot_open(ROT *rot)
}
}
if (rotp->type.rig != RIG_PORT_NETWORK && rotp->type.rig != RIG_PORT_UDP_NETWORK)
{
if (rotp->parm.serial.dtr_state == RIG_SIGNAL_ON)
{
ser_set_dtr(rotp, 1);
}
else
{
ser_set_dtr(rotp, 0);
}
if (rotp->parm.serial.rts_state == RIG_SIGNAL_ON)
{
ser_set_rts(rotp, 1);
}
else
{
ser_set_rts(rotp, 0);
}
}
memcpy(&rs->rotport_deprecated, rotp,
sizeof(rs->rotport_deprecated));