From 1a47532f411488f003726aa9365ede5dc90c5b78 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 7 Dec 2013 09:51:58 -0800 Subject: [PATCH] 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 --- altosui/AltosDisplayThread.java | 1 + 1 file changed, 1 insertion(+) 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", -- 2.30.2