altosui: Don't try to report bearing/elevation without GPS
authorKeith Packard <keithp@keithp.com>
Sat, 7 Dec 2013 17:51:58 +0000 (09:51 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 7 Dec 2013 17:51:58 +0000 (09:51 -0800)
If the distance from the pad cannot be computed (due to lacking GPS),
then don't try to report it.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosDisplayThread.java

index 37f6adf9051613ec0686b0564dacfc442e128024..4b4cc3b9ac2aee901b5e633228eb2142b15ad4e9 100644 (file)
@@ -89,6 +89,7 @@ public class AltosDisplayThread extends Thread {
                        /* If the rocket isn't on the pad, then report height */
                        if (Altos.ao_flight_drogue <= state.state &&
                            state.state < Altos.ao_flight_landed &&
+                           state.from_pad != null &&
                            state.range >= 0)
                        {
                                voice.speak("Height %s, bearing %s %d, elevation %d, range %s.\n",