String name;
AltosFlightReader reader;
int crc_errors;
- AltosStatusTable flightStatus;
- AltosInfoTable flightInfo;
+ AltosFlightDisplay display;
+
+ synchronized void show(AltosState state, int crc_errors) {
+ if (state != null)
+ display.show(state, crc_errors);
+ }
class IdleThread 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);
+ }
}
}
return ret;
}
- void show(AltosState state, int crc_errors) {
- if (state != null) {
- flightStatus.set(state);
- flightInfo.show(state, crc_errors);
- }
- }
-
public void run() {
boolean interrupted = false;
String line;
idle_thread = new IdleThread();
- flightInfo.clear();
+ display.reset();
try {
for (;;) {
try {
}
}
- 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;
}
}