summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d8b2715)
And only set this for tracker products; other products place state in
separate state packets
Signed-off-by: Keith Packard <keithp@keithp.com>
ao_xmemcpy(&telemetry.location.flags,
&ao_gps_data.flags,
26);
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));
telemetry.location.tick = ao_gps_tick;
ao_mutex_put(&ao_gps_mutex);
ao_radio_send(&telemetry, sizeof (telemetry));
#define AO_GPS_MODE_MANUAL 'M'
#define AO_GPS_MODE_SIMULATED 'S'
#define AO_GPS_MODE_MANUAL 'M'
#define AO_GPS_MODE_SIMULATED 'S'
+#define AO_GPS_STATE_VALID 0x80
+
struct ao_telemetry_location {
uint16_t serial; /* 0 */
uint16_t tick; /* 2 */
struct ao_telemetry_location {
uint16_t serial; /* 0 */
uint16_t tick; /* 2 */