kopia lustrzana https://github.com/Hamlib/Hamlib
Merge pull request #224 from dl1ycf/master
Make "pihpsdr" RIG_PORT_SERIAL by default, and fall back to TCP in rig_open if pathname of the form ":19090"pull/234/head
commit
1396913de4
|
@ -108,11 +108,17 @@ const struct rig_caps pihpsdr_caps =
|
|||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_RIG,
|
||||
.port_type = RIG_PORT_NETWORK,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 4800,
|
||||
.serial_rate_max = 38400,
|
||||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 1,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = 0,
|
||||
.post_write_delay = 50, /* ms */
|
||||
.timeout = 0,
|
||||
.retry = 0,
|
||||
.timeout = 50,
|
||||
.retry = 1,
|
||||
.has_get_func = PIHPSDR_FUNC_ALL,
|
||||
.has_set_func = PIHPSDR_FUNC_ALL,
|
||||
.has_get_level = PIHPSDR_LEVEL_ALL,
|
||||
|
|
|
@ -581,6 +581,12 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
rs->rigport.pathname);
|
||||
rs->rigport.type.rig = RIG_PORT_NETWORK;
|
||||
}
|
||||
if (sscanf(rs->rigport.pathname, ":%d", &port) == 1)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: using network address %s\n", __func__,
|
||||
rs->rigport.pathname);
|
||||
rs->rigport.type.rig = RIG_PORT_NETWORK;
|
||||
}
|
||||
|
||||
if (rs->rigport.type.rig == RIG_PORT_SERIAL)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue