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" } };
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;
this.setVisible(true);
- thread = new AltosDisplayThread(this, voice, flightStatus, flightInfo, reader);
+ thread = new AltosDisplayThread(this, voice, this, reader);
thread.start();
}