1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

THROTTLE ANGLE CORRECTION , "*" "/" operator priority bug

http://www.multiwii.com/forum/viewtopic.php?f=8&t=4433
This commit is contained in:
treymarc 2014-01-04 22:19:51 +01:00
parent 1dea496fd5
commit b2e7c8d8fc

View file

@ -315,7 +315,7 @@ static void getEstimatedAttitude(void)
acc_calc(deltaT); // rotate acc vector into earth frame
if (cfg.throttle_angle_correction) {
int cosZ = EstG.V.Z / (acc_1G * 100.0f);
int cosZ = ((int32_t)(EstG.V.Z * 100.0f)) / acc_1G;
throttleAngleCorrection = cfg.throttle_angle_correction * constrain(100 - cosZ, 0, 100) / 8;
}
}