diff options
| author | Keith Packard <keithp@keithp.com> | 2010-11-23 19:08:07 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-11-23 19:10:27 -0800 |
| commit | 6cd9be22f06f21d12ee2f668989d83d3c61d14c0 (patch) | |
| tree | e382abd414c9c50bc6efadee2fd8308a46e01157 /ao-tools/altosui/AltosEepromDownload.java | |
| parent | ed7cf7d262fcf7c0c677c2fb981582b571de9e5e (diff) | |
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 <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosEepromDownload.java')
| -rw-r--r-- | ao-tools/altosui/AltosEepromDownload.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ao-tools/altosui/AltosEepromDownload.java b/ao-tools/altosui/AltosEepromDownload.java index fb5dcfc0..02fc36f2 100644 --- a/ao-tools/altosui/AltosEepromDownload.java +++ b/ao-tools/altosui/AltosEepromDownload.java @@ -97,7 +97,7 @@ public class AltosEepromDownload implements Runnable { /* Pull the serial number out of the version information */ for (;;) { - String line = serial_line.get_reply(1000); + String line = serial_line.get_reply(5000); if (line == null) throw new TimeoutException(); @@ -127,7 +127,7 @@ public class AltosEepromDownload implements Runnable { any_valid = false; monitor.set_value(state_names[state], state, block - state_block); for (addr = 0; addr < 0x100;) { - String line = serial_line.get_reply(1000); + String line = serial_line.get_reply(5000); if (line == null) throw new TimeoutException(); int[] values = ParseHex(line); @@ -216,8 +216,7 @@ public class AltosEepromDownload implements Runnable { public void run () { if (remote) { - serial_line.set_channel(AltosPreferences.channel(device.getSerial())); - serial_line.set_callsign(AltosPreferences.callsign()); + serial_line.set_radio(); serial_line.printf("p\nE 0\n"); serial_line.flush_input(); } |
