ao_flight: ao_interval_end type was too small, could cause premature landing state
authorKeith Packard <keithp@keithp.com>
Fri, 28 Jan 2022 22:50:58 +0000 (14:50 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 17 Feb 2022 01:26:49 +0000 (17:26 -0800)
commit7917ec1f105f39799acbea0f4c28d25db4f66eb4
treec97592dbf6eb96a058b7402ddc6b60b94f550de4
parent6f06cf3e8fe0531b927d5e11ae2b0e9af3663b0f
ao_flight: ao_interval_end type was too small, could cause premature landing state

ao_interval_end is used to provide a window of time during which the
max/min values for sensors are measured. After that time expires,
those bounds are compared to see if the airframe has been stable and
should be moved to landing state. With a type that is too small, that
could happen immediately after transitioning to main (for baro-enabled
devices) or coast (for accel-only devices). For baro devices, this
would disable any redundant main firing events. For accel-only
devices, this could disable all events occuring after coast, including
firing separation charges or motor igniters.

There are also a couple of additional changes to reduce -Wconversion
messages.

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