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

Fix bug that prevented throttle angle correction working correctly when

using different values in different.

The cause was the IMU init code which triggered calculation was never
called after switching profiles - it couldn't be called twice because it
also initialised the compass.

The solution was to decouple compass initialisation from IMU
initialisation and extract the code to recalculate throttle angle scale
to a new method.
This commit is contained in:
Dominic Clifton 2014-06-06 20:00:41 +01:00
parent 64a43c77ca
commit ab0296c991
6 changed files with 28 additions and 22 deletions

View file

@ -23,3 +23,5 @@ extern int16_t throttleAngleCorrection;
int getEstimatedAltitude(void);
void computeIMU(void);
void calculateThrottleAngleScale(uint16_t throttle_correction_angle);
int16_t calculateThrottleAngleCorrection(uint8_t throttle_correction_value);