altos: full logging must flush pending data before checking state
authorKeith Packard <keithp@keithp.com>
Sun, 27 Mar 2011 06:38:54 +0000 (23:38 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 27 Mar 2011 06:38:54 +0000 (23:38 -0700)
commit7ce8c9081e703d1405c2595ab9bda0cfa218c6c4
treef6fbfe4b2ae18646d6fc56e80b7053d6f32a8b5d
parent3945d8f986d8f4bd3186a2cbaed5186e49d59839
altos: full logging must flush pending data before checking state

Flight state must be checked only after any pending data have been
written to the log as the 'current' flight state is only valid when
the pending data values have been processed. This ensures that the
'boost' state is not marked until the full ring of data is
written. This ensures that the data processing code can find the
barometer values from before boost to get an idea of the ground
pressure value.

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