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;
state.state < Altos.ao_flight_landed &&
state.range >= 0)
{
- voice.speak("Height %d, bearing %d, elevation %d, range %d.\n",
+ voice.speak("Height %d, bearing %s %d, elevation %d, range %d.\n",
(int) (state.height + 0.5),
+ state.from_pad.bearing_words(
+ AltosGreatCircle.BEARING_VOICE),
(int) (state.from_pad.bearing + 0.5),
(int) (state.elevation + 0.5),
(int) (state.range + 0.5));
(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)
- display.show(state, crc_errors);
- }
-
public void run() {
boolean interrupted = false;
String line;