X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosDisplayThread.java;h=3e719130a6a7c67475f41d98a8740b9904e66e01;hb=a08b2a6363c194195db92029743f6612676373ce;hp=b5b2777e7885bbc79071faae7fd4238e0563a446;hpb=b0d31910da592e2f67c47c8fc3e15ce8135d5094;p=fw%2Faltos diff --git a/ao-tools/altosui/AltosDisplayThread.java b/ao-tools/altosui/AltosDisplayThread.java index b5b2777e..3e719130 100644 --- a/ao-tools/altosui/AltosDisplayThread.java +++ b/ao-tools/altosui/AltosDisplayThread.java @@ -69,8 +69,10 @@ public class AltosDisplayThread extends Thread { 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)); @@ -114,10 +116,6 @@ public class AltosDisplayThread extends Thread { } public void run () { - - reported_landing = 0; - state = null; - report_interval = 10000; try { for (;;) { set_report_time(); @@ -157,6 +155,12 @@ public class AltosDisplayThread extends Thread { } else if (spoken) set_report_time(); } + + public IdleThread() { + state = null; + reported_landing = 0; + report_interval = 10000; + } } boolean tell(AltosState state, AltosState old_state) {