altosui: report rocket ground bearing at landing only if known
authorKeith Packard <keithp@keithp.com>
Thu, 29 Jul 2010 04:01:41 +0000 (21:01 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 29 Jul 2010 04:01:41 +0000 (21:01 -0700)
if state.from_pad is null, then there isn't any data to report.

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

index 863d173e530a731e2ecb3ba94a73f2eec8eadaab..5c771df20816993e6d700f9e481b0eb1a11f0d9f 100644 (file)
@@ -374,7 +374,7 @@ public class AltosUI extends JFrame {
                                        voice.speak("rocket landed safely");
                                else
                                        voice.speak("rocket may have crashed");
-                               if (state.gps != null)
+                               if (state.from_pad != null)
                                        voice.speak("bearing %d degrees, range %d meters",
                                                    (int) (state.from_pad.bearing + 0.5),
                                                    (int) (state.from_pad.distance + 0.5));