mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Merge pull request #9990 from ctzsnooze/refactor-Thrust-Linear-update
This commit is contained in:
commit
7bb2c26c43
3 changed files with 3 additions and 2 deletions
|
@ -293,9 +293,8 @@ float pidCompensateThrustLinearization(float throttle)
|
|||
{
|
||||
if (pidRuntime.thrustLinearization != 0.0f) {
|
||||
// for whoops where a lot of TL is needed, allow more throttle boost
|
||||
const float throttleCompensateAmount = (1.0f - 0.5f * pidRuntime.thrustLinearization);
|
||||
const float throttleReversed = (1.0f - throttle);
|
||||
throttle /= 1.0f + throttleCompensateAmount * powerf(throttleReversed, 2) * pidRuntime.thrustLinearization;
|
||||
throttle /= 1.0f + pidRuntime.throttleCompensateAmount * powerf(throttleReversed, 2);
|
||||
}
|
||||
return throttle;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue