summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-07 09:51:58 -0800
committerKeith Packard <keithp@keithp.com>2013-12-07 09:51:58 -0800
commit1a47532f411488f003726aa9365ede5dc90c5b78 (patch)
tree675fc08d1859f0590c8d922f752f770a45ce6907
parent44249a9262a16ed103aedf30a300003fc2a17579 (diff)
altosui: Don't try to report bearing/elevation without GPS
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>
-rw-r--r--altosui/AltosDisplayThread.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/altosui/AltosDisplayThread.java b/altosui/AltosDisplayThread.java
index 37f6adf9..4b4cc3b9 100644
--- a/altosui/AltosDisplayThread.java
+++ b/altosui/AltosDisplayThread.java
@@ -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",