summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-05 18:44:26 -0700
committerKeith Packard <keithp@keithp.com>2014-06-05 18:44:26 -0700
commit97dac0f66bc938940e6b49409d950a1736c92655 (patch)
treead94c40b30974ccbc55ecbbb803f4fce86b85911
parenteebcf07950e909e4516b08c32e289a870f772793 (diff)
altos: Stick flight state in GPS location packets
Useful for TeleGPS Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/kernel/ao_telemetry.c1
-rw-r--r--src/kernel/ao_telemetry.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/ao_telemetry.c b/src/kernel/ao_telemetry.c
index a1c19185..7850f738 100644
--- a/src/kernel/ao_telemetry.c
+++ b/src/kernel/ao_telemetry.c
@@ -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));
diff --git a/src/kernel/ao_telemetry.h b/src/kernel/ao_telemetry.h
index fe07c2af..1aeda264 100644
--- a/src/kernel/ao_telemetry.h
+++ b/src/kernel/ao_telemetry.h
@@ -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 */
};