projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
118fe84
)
altos: Added check for an accel value above 1.5g
author
Mike Beattie
<mike@ethernal.org>
Sat, 15 Jan 2011 10:21:26 +0000
(23:21 +1300)
committer
Keith Packard
<keithp@keithp.com>
Sun, 16 Jan 2011 22:35:29 +0000
(14:35 -0800)
When detecting flight or idle mode, this should indicate
that accel cal values are out of whack.
Signed-off-by: Mike Beattie <mike@ethernal.org>
src/ao_flight.c
patch
|
blob
|
history
diff --git
a/src/ao_flight.c
b/src/ao_flight.c
index 9f651ae29d214f759efa96a7986590a6d755afcd..5a9a8d801037c4d278abbc39d754e34053086ce3 100644
(file)
--- a/
src/ao_flight.c
+++ b/
src/ao_flight.c
@@
-221,6
+221,7
@@
ao_flight(void)
if (ao_config.accel_plus_g != 0 &&
ao_config.accel_minus_g != 0 &&
ao_flight_accel < ao_config.accel_plus_g + ACCEL_NOSE_UP &&
+ ao_flight_accel > ao_config.accel_plus_g - ACCEL_NOSE_UP &&
!ao_flight_force_idle)
{
/* Disable the USB controller in flight mode