diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index ece7425f4..0796cd216 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -295,7 +295,7 @@ float pidCompensateThrustLinearization(float throttle) if (pidRuntime.thrustLinearization != 0.0f) { // for whoops where a lot of TL is needed, allow more throttle boost const float throttleReversed = (1.0f - throttle); - throttle /= 1.0f + pidRuntime.throttleCompensateAmount * powerf(throttleReversed, 2) * pidRuntime.thrustLinearization; + throttle /= 1.0f + pidRuntime.throttleCompensateAmount * powerf(throttleReversed, 2); } return throttle; } diff --git a/src/main/flight/pid_init.c b/src/main/flight/pid_init.c index 632a4e86d..08545ee65 100644 --- a/src/main/flight/pid_init.c +++ b/src/main/flight/pid_init.c @@ -375,7 +375,7 @@ void pidInitConfig(const pidProfile_t *pidProfile) #ifdef USE_THRUST_LINEARIZATION pidRuntime.thrustLinearization = pidProfile->thrustLinearization / 100.0f; - pidRuntime.throttleCompensateAmount = (1.0f - 0.5f * pidRuntime.thrustLinearization); + pidRuntime.throttleCompensateAmount = pidRuntime.thrustLinearization - 0.5f * powerf(pidRuntime.thrustLinearization, 2); #endif #if defined(USE_D_MIN) for (int axis = FD_ROLL; axis <= FD_YAW; ++axis) {