Don't report distance to rocket without valid GPS
authorKeith Packard <keithp@keithp.com>
Sat, 18 Jul 2009 08:47:34 +0000 (01:47 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 18 Jul 2009 08:47:34 +0000 (01:47 -0700)
When there's no valid GPS data, don't try to report the distance and bearing
to the rocket after landing.

Signed-off-by: Keith Packard <keithp@keithp.com>
aoview/aoview_state.c

index 9852cabd257633687bbe691ce2db0a64fcca86ab..7efd33b0ebf5a62942a00a88e520c96c9b8d18f4 100644 (file)
@@ -251,7 +251,7 @@ aoview_state_timeout(gpointer data)
                                aoview_voice_speak("rocket landed safely\n");
                        else
                                aoview_voice_speak("rocket may have crashed\n");
                                aoview_voice_speak("rocket landed safely\n");
                        else
                                aoview_voice_speak("rocket may have crashed\n");
-                       if (aostate.gps.gps_connected) {
+                       if (aostate.gps_valid) {
                                aoview_voice_speak("rocket reported %s of pad distance %d meters\n",
                                                   aoview_compass_point(aostate.bearing),
                                                   (int) aostate.distance);
                                aoview_voice_speak("rocket reported %s of pad distance %d meters\n",
                                                   aoview_compass_point(aostate.bearing),
                                                   (int) aostate.distance);