From: Keith Packard Date: Sat, 7 Dec 2013 17:51:58 +0000 (-0800) Subject: altosui: Don't try to report bearing/elevation without GPS X-Git-Tag: 1.3~77 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=1a47532f411488f003726aa9365ede5dc90c5b78 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 --- 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",