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:
parent
64a43c77ca
commit
ab0296c991
6 changed files with 28 additions and 22 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue