mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Use macros for power with integer exponents
This commit is contained in:
parent
adcc36888b
commit
1b95e3c20f
5 changed files with 6 additions and 5 deletions
|
@ -393,7 +393,7 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
|||
|
||||
#ifdef USE_THRUST_LINEARIZATION
|
||||
pidRuntime.thrustLinearization = pidProfile->thrustLinearization / 100.0f;
|
||||
pidRuntime.throttleCompensateAmount = pidRuntime.thrustLinearization - 0.5f * powf(pidRuntime.thrustLinearization, 2);
|
||||
pidRuntime.throttleCompensateAmount = pidRuntime.thrustLinearization - 0.5f * sq(pidRuntime.thrustLinearization);
|
||||
#endif
|
||||
|
||||
#if defined(USE_D_MIN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue