From 6cd9be22f06f21d12ee2f668989d83d3c61d14c0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 23 Nov 2010 19:08:07 -0800 Subject: altosui: New AltosSerial.set_radio function sets channel/call Use this anytime you need to set the device radio channel and call sign, either for telemetry reception or packet mode origination. This uses the saved callsign and per-device radio channel number. Do not use this when opening a telemetrum as there won't be a saved channel number. Signed-off-by: Keith Packard --- ao-tools/altosui/AltosConfig.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ao-tools/altosui/AltosConfig.java') diff --git a/ao-tools/altosui/AltosConfig.java b/ao-tools/altosui/AltosConfig.java index 6bda20d8..52dbfd79 100644 --- a/ao-tools/altosui/AltosConfig.java +++ b/ao-tools/altosui/AltosConfig.java @@ -109,9 +109,8 @@ public class AltosConfig implements Runnable, ActionListener { void start_serial() throws InterruptedException { if (remote) { - serial_line.set_channel(AltosPreferences.channel(device.getSerial())); - serial_line.set_callsign(AltosPreferences.callsign()); - serial_line.printf("p\n"); + serial_line.set_radio(); + serial_line.printf("p\nE 0\n"); serial_line.flush_input(); } } @@ -128,7 +127,7 @@ public class AltosConfig implements Runnable, ActionListener { start_serial(); serial_line.printf("c s\nv\n"); for (;;) { - String line = serial_line.get_reply(1000); + String line = serial_line.get_reply(5000); if (line == null) throw new TimeoutException(); get_int(line, "serial-number", serial); -- cgit v1.2.3