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