altos: Stick flight state in GPS location packets
authorKeith Packard <keithp@keithp.com>
Fri, 6 Jun 2014 01:44:26 +0000 (18:44 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 6 Jun 2014 01:44:26 +0000 (18:44 -0700)
Useful for TeleGPS

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_telemetry.c
src/kernel/ao_telemetry.h

index a1c19185416fd56cdd3a1dac6bcabf892ef8ec0c..7850f738bd39d42f4ad32ea09908a7ac5b4c8e9a 100644 (file)
@@ -334,6 +334,7 @@ ao_send_location(void)
                ao_xmemcpy(&telemetry.location.flags,
                       &ao_gps_data.flags,
                       26);
+               telemetry.location.state = ao_flight_state;
                telemetry.location.tick = ao_gps_tick;
                ao_mutex_put(&ao_gps_mutex);
                ao_radio_send(&telemetry, sizeof (telemetry));
index fe07c2af490d14368a994012815d81ec869ad159..1aeda264389498e0702b8ff37850457379330e28 100644 (file)
@@ -115,7 +115,7 @@ struct ao_telemetry_location {
        uint16_t        ground_speed;   /* 26 cm/s */
        int16_t         climb_rate;     /* 28 cm/s */
        uint8_t         course;         /* 30 degrees / 2 */
-       uint8_t         unused[1];      /* 31 */
+       uint8_t         state;          /* 31 flight state */
        /* 32 */
 };