diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-09 10:21:34 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-09 10:21:34 -0800 |
commit | eb77e806ded99532dc7eaa39c1893f075b028af6 (patch) | |
tree | 87473598b7baaf2432eb230508b41fba11fea51b /ao-tools/altosui/AltosDisplayThread.java | |
parent | a0a92c605e238277c9881545a7226e53b5dbc295 (diff) |
altosui: Create abstract interface for flight data display
This allows the implementation of the flight data display to occur in
the flight UI instead of the display thread.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosDisplayThread.java')
-rw-r--r-- | ao-tools/altosui/AltosDisplayThread.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/ao-tools/altosui/AltosDisplayThread.java b/ao-tools/altosui/AltosDisplayThread.java index b15472ed..957ac0d6 100644 --- a/ao-tools/altosui/AltosDisplayThread.java +++ b/ao-tools/altosui/AltosDisplayThread.java @@ -36,8 +36,7 @@ public class AltosDisplayThread extends Thread { String name; AltosFlightReader reader; int crc_errors; - AltosStatusTable flightStatus; - AltosInfoTable flightInfo; + AltosFlightDisplay display; class IdleThread extends Thread { @@ -182,10 +181,8 @@ public class AltosDisplayThread extends Thread { } void show(AltosState state, int crc_errors) { - if (state != null) { - flightStatus.set(state); - flightInfo.show(state, crc_errors); - } + if (state != null) + display.show(state, crc_errors); } public void run() { @@ -197,7 +194,7 @@ public class AltosDisplayThread extends Thread { idle_thread = new IdleThread(); - flightInfo.clear(); + display.reset(); try { for (;;) { try { @@ -235,11 +232,10 @@ public class AltosDisplayThread extends Thread { } } - public AltosDisplayThread(Frame in_parent, AltosVoice in_voice, AltosStatusTable in_status, AltosInfoTable in_info, AltosFlightReader in_reader) { + public AltosDisplayThread(Frame in_parent, AltosVoice in_voice, AltosFlightDisplay in_display, AltosFlightReader in_reader) { parent = in_parent; voice = in_voice; - flightStatus = in_status; - flightInfo = in_info; + display = in_display; reader = in_reader; } } |