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
Michael Black 2020-04-25 11:15:31 -05:00 zatwierdzone przez GitHub
commit 1396913de4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 15 dodań i 3 usunięć

Wyświetl plik

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

Wyświetl plik

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