summaryrefslogtreecommitdiff
path: root/ao_flight.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-10 23:00:06 -0700
committerKeith Packard <keithp@keithp.com>2009-05-10 23:00:06 -0700
commitb623b1098bc7a10d471730259438fb82804221d0 (patch)
tree48ba40971f0055d86ead04e560bd5966e380d907 /ao_flight.c
parente9584e846b9bd7926d61451d32ba5d7a30416f7b (diff)
Initialize ao_min_vel with |ao_flight_vel|
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>
Diffstat (limited to 'ao_flight.c')
-rw-r--r--ao_flight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ao_flight.c b/ao_flight.c
index f4b5279b..91953975 100644
--- a/ao_flight.c
+++ b/ao_flight.c
@@ -312,7 +312,7 @@ ao_flight(void)
/* 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));
}