diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-09 23:34:32 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-09 23:34:32 -0800 |
commit | b0d31910da592e2f67c47c8fc3e15ce8135d5094 (patch) | |
tree | 4caabe69247596dced4dc84063322b091e60b379 /ao-tools/altosui/AltosDisplayThread.java | |
parent | 22d00785188a880700cd372528189a7a15278da9 (diff) |
altosui: Add ascent, descent and landed tabs
This completes the set of tabs for in-flight status information.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosDisplayThread.java')
-rw-r--r-- | ao-tools/altosui/AltosDisplayThread.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ao-tools/altosui/AltosDisplayThread.java b/ao-tools/altosui/AltosDisplayThread.java index 957ac0d6..b5b2777e 100644 --- a/ao-tools/altosui/AltosDisplayThread.java +++ b/ao-tools/altosui/AltosDisplayThread.java @@ -38,6 +38,11 @@ public class AltosDisplayThread extends Thread { int crc_errors; AltosFlightDisplay display; + synchronized void show(AltosState state, int crc_errors) { + if (state != null) + display.show(state, crc_errors); + } + class IdleThread extends Thread { boolean started; @@ -93,6 +98,10 @@ public class AltosDisplayThread extends Thread { (int) (state.from_pad.bearing + 0.5), (int) (state.from_pad.distance + 0.5)); ++reported_landing; + if (state.state != Altos.ao_flight_landed) { + state.state = Altos.ao_flight_landed; + show(state, 0); + } } } @@ -180,11 +189,6 @@ public class AltosDisplayThread extends Thread { return ret; } - void show(AltosState state, int crc_errors) { - if (state != null) - display.show(state, crc_errors); - } - public void run() { boolean interrupted = false; String line; |