Recognise the IC-7851, IC-7600, IC-9100, Xiegus and the Lab599 TX-500
Their Hamlib models, CI-V addresses or ID; replies and flrig names, from Hamlib 4.7.2 and flrig 2.0.12. Xiegus share their addresses with Icoms, and the TX-500 answers as a TS-2000 does, so a probe lists both. The probe takes a CI-V ID of two bytes, as some Xiegus answer, and `radio probe` capitalises "One of". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ad57b6b1a4
commit
4794c186ee
+21
-2
@@ -343,7 +343,11 @@ while time.monotonic() < end:
|
||||
heard = b""
|
||||
if sys.argv[2] == "icom" and civ_request in heard:
|
||||
# With CI-V USB echo on, the radio echoes the request first
|
||||
os.write(master, civ_request + bytes.fromhex("fefee0a41900a4fd"))
|
||||
os.write(master, civ_request + bytes.fromhex("fefee094190094fd"))
|
||||
heard = b""
|
||||
if sys.argv[2] == "xiegu" and civ_request in heard:
|
||||
# An X6100: its ID in two bytes, from the IC-705's address
|
||||
os.write(master, bytes.fromhex("fefee0a419006100fd"))
|
||||
heard = b""
|
||||
EOF
|
||||
python3 "$BATS_TEST_TMPDIR/fake_radio.py" "$BATS_TEST_TMPDIR/pty" "$1" 3>&- &
|
||||
@@ -371,7 +375,22 @@ teardown() {
|
||||
fake_radio icom
|
||||
run bash "$REPO/radio" probe "$PTY"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "Icom IC-705 (Hamlib model 3085), at 38400 baud" ]
|
||||
[ "$output" = "Icom IC-7300 (Hamlib model 3073), at 38400 baud" ]
|
||||
}
|
||||
|
||||
@test "probe hears a Xiegu's two-byte ID, and lists the radios at its address" {
|
||||
fake_radio xiegu
|
||||
run bash "$REPO/radio" probe "$PTY"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "One of: Icom IC-705 (Hamlib model 3085), Xiegu X6100 (Hamlib model 3087), Xiegu X6200 (Hamlib model 3091), at 38400 baud" ]
|
||||
}
|
||||
|
||||
@test "--probe lists a Lab599 TX-500 with the TS-2000, which answers ID; alike" {
|
||||
usb 1-4 0403:6001 FTDI "FT232R USB UART" A12345
|
||||
port 1-4 ttyUSB0
|
||||
answers ttyUSB0 "38400 cat_id 019"
|
||||
run bash "$REPO/radio" --probe
|
||||
[ "${lines[0]}" = "1. One of: Kenwood TS-2000 (Hamlib model 2014), Lab599 TX-500 (Hamlib model 2050), answered on ttyUSB0 at 38400 baud" ]
|
||||
}
|
||||
|
||||
@test "probe says when nothing answers on a real port" {
|
||||
|
||||
Reference in New Issue
Block a user