Add experimental network serial mode for network-based serial interfaces

pull/224/head
Michael Black 2020-04-03 08:02:31 -05:00
rodzic ed2a359a64
commit 67d09427d3
4 zmienionych plików z 23 dodań i 1 usunięć

Wyświetl plik

@ -310,7 +310,7 @@ const struct rot_caps ioptron_rot_caps =
.copyright = "LGPL",
.status = RIG_STATUS_ALPHA,
.rot_type = ROT_TYPE_AZEL,
.port_type = RIG_PORT_SERIAL|RIG_PORT_NETWORK,
.port_type = RIG_PORT_SERIAL,
.serial_rate_min = 9600,
.serial_rate_max = 9600,
.serial_data_bits = 8,

Wyświetl plik

@ -310,6 +310,13 @@ int HAMLIB_API amp_open(AMP *amp)
rs->ampport.fd = -1;
// determine if we have a network address
if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
{
rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname);
rs->rotport.type.rig = RIG_PORT_NETWORK;
}
switch (rs->ampport.type.rig)
{
case RIG_PORT_SERIAL:

Wyświetl plik

@ -568,6 +568,13 @@ int HAMLIB_API rig_open(RIG *rig)
rs->rigport.fd = -1;
// determine if we have a network address
if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
{
rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname);
rs->rotport.type.rig = RIG_PORT_NETWORK;
}
if (rs->rigport.type.rig == RIG_PORT_SERIAL)
{
if (rs->rigport.parm.serial.rts_state != RIG_SIGNAL_UNSET

Wyświetl plik

@ -320,6 +320,7 @@ int HAMLIB_API rot_open(ROT *rot)
const struct rot_caps *caps;
struct rot_state *rs;
int status;
int net1,net2,net3,net4,port;
rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@ -338,6 +339,13 @@ int HAMLIB_API rot_open(ROT *rot)
rs->rotport.fd = -1;
// determine if we have a network address
if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
{
rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname);
rs->rotport.type.rig = RIG_PORT_NETWORK;
}
switch (rs->rotport.type.rig)
{
case RIG_PORT_SERIAL: