X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosFlightUI.java;h=11fc24425598b238a341e422ee54c12c60bce472;hb=eb77e806ded99532dc7eaa39c1893f075b028af6;hp=84ba9dca5c1902fdf3f9eef7118563748f8458ed;hpb=a0a92c605e238277c9881545a7226e53b5dbc295;p=fw%2Faltos diff --git a/ao-tools/altosui/AltosFlightUI.java b/ao-tools/altosui/AltosFlightUI.java index 84ba9dca..11fc2442 100644 --- a/ao-tools/altosui/AltosFlightUI.java +++ b/ao-tools/altosui/AltosFlightUI.java @@ -28,7 +28,7 @@ import java.text.*; import java.util.prefs.*; import java.util.concurrent.LinkedBlockingQueue; -public class AltosFlightUI extends JFrame { +public class AltosFlightUI extends JFrame implements AltosFlightDisplay { String[] statusNames = { "Height (m)", "State", "RSSI (dBm)", "Speed (m/s)" }; Object[][] statusData = { { "0", "pad", "-50", "0" } }; @@ -62,6 +62,15 @@ public class AltosFlightUI extends JFrame { stop_display(); } + public void reset() { + flightInfo.clear(); + } + + public void show(AltosState state, int crc_errors) { + flightStatus.set(state); + flightInfo.show(state, crc_errors); + } + public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) { voice = in_voice; reader = in_reader; @@ -117,7 +126,7 @@ public class AltosFlightUI extends JFrame { this.setVisible(true); - thread = new AltosDisplayThread(this, voice, flightStatus, flightInfo, reader); + thread = new AltosDisplayThread(this, voice, this, reader); thread.start(); }