altos: Use 0x80 to indicate valid state value in the GPS location packet
[fw/altos] / src / kernel / ao_telemetry.c
index 7850f738bd39d42f4ad32ea09908a7ac5b4c8e9a..2292d229d673a02b6b8ef1ebd87d45720f0fc9dc 100644 (file)
@@ -334,7 +334,9 @@ ao_send_location(void)
                ao_xmemcpy(&telemetry.location.flags,
                       &ao_gps_data.flags,
                       26);
-               telemetry.location.state = ao_flight_state;
+#if HAS_TRACKER
+               telemetry.location.state = ao_flight_state | AO_GPS_STATE_VALID;
+#endif
                telemetry.location.tick = ao_gps_tick;
                ao_mutex_put(&ao_gps_mutex);
                ao_radio_send(&telemetry, sizeof (telemetry));