The average accelerometer value cannot be extracted from the log as the
record starts after that is computed. As that drives much of the
accelerometer-based state transition logic, it is an important value to
have, so we log it as part of the flight start record now.
Signed-off-by: Keith Packard <keithp@keithp.com>
uint16_t tick;
union {
struct {
- uint16_t serial;
+ int16_t ground_accel;
uint16_t flight;
} flight;
struct {
log.type = AO_LOG_FLIGHT;
log.tick = ao_flight_tick;
- log.u.flight.serial = 0;
+ log.u.flight.ground_accel = ao_ground_accel;
log.u.flight.flight = ao_log_dump_flight + 1;
ao_log_data(&log);
for (;;) {