As ao_min_vel is stored as an absolute value, it's important to preserve
that invariant, even though we don't expect ao_flight_vel to be negative at
coast.
Signed-off-by: Keith Packard <keithp@keithp.com>
/* set min velocity to current velocity for
* apogee detect
*/
/* set min velocity to current velocity for
* apogee detect
*/
- ao_min_vel = ao_flight_vel;
+ ao_min_vel = abs(ao_flight_vel);
ao_flight_state = ao_flight_apogee;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
}
ao_flight_state = ao_flight_apogee;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
}