1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 03:20:00 +03:00

fix accZ/shake detection when copter upside down. oops.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@432 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2013-10-12 06:57:31 +00:00
parent a9b094dca6
commit 6bbc8fdb22

View file

@ -288,7 +288,7 @@ static void getEstimatedAttitude(void)
EstM.A[axis] = (EstM.A[axis] * (float)mcfg.gyro_cmpfm_factor + magADC[axis]) * INV_GYR_CMPFM_FACTOR; EstM.A[axis] = (EstM.A[axis] * (float)mcfg.gyro_cmpfm_factor + magADC[axis]) * INV_GYR_CMPFM_FACTOR;
} }
if (abs(EstG.A[Z]) > accZ_25deg) if (EstG.A[Z] > accZ_25deg)
f.SMALL_ANGLES_25 = 1; f.SMALL_ANGLES_25 = 1;
else else
f.SMALL_ANGLES_25 = 0; f.SMALL_ANGLES_25 = 0;