summaryrefslogtreecommitdiff
path: root/altosui/AltosSerial.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-16 17:38:00 -0700
committerKeith Packard <keithp@keithp.com>2011-07-16 17:48:51 -0700
commit941b90a4905e34936d24a25ca90ac04eb6f5a792 (patch)
tree7a0e7000b813db31ab607fec4b781e4609839788 /altosui/AltosSerial.java
parent7ef786276b5d5c7d17c3fe4f36aa41db61a9742f (diff)
altosui: Generalize and centralize telemetry constants, parse v0.8 telemetry
Move telemetry constants to Altos class, adding functions to compute names and lengths. Generalize users of these values to use all of the known values. Add support for v0.8 TeleMetrum telemetry Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosSerial.java')
-rw-r--r--altosui/AltosSerial.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java
index 3666cb41..2e8ce870 100644
--- a/altosui/AltosSerial.java
+++ b/altosui/AltosSerial.java
@@ -326,13 +326,7 @@ public class AltosSerial implements Runnable {
}
private int telemetry_len() {
- switch (telemetry) {
- case 1:
- default:
- return Altos.ao_telemetry_legacy_len;
- case 2:
- return Altos.ao_telemetry_split_len;
- }
+ return Altos.telemetry_len(telemetry);
}
public void set_channel(int in_channel) {
@@ -404,7 +398,7 @@ public class AltosSerial implements Runnable {
line = "";
monitor_mode = false;
frame = null;
- telemetry = Altos.ao_telemetry_split;
+ telemetry = Altos.ao_telemetry_standard;
monitors = new LinkedList<LinkedBlockingQueue<AltosLine>> ();
reply_queue = new LinkedBlockingQueue<AltosLine> ();
open();