mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Add higher power function to Super Expo
This commit is contained in:
parent
fb7cfffdeb
commit
754982f480
2 changed files with 62 additions and 1 deletions
|
@ -81,8 +81,10 @@ float calculateExpoPlus(int axis, const rxConfig_t *rxConfig) {
|
|||
if (axis == YAW && !rxConfig->superExpoYawMode) {
|
||||
propFactor = 1.0f;
|
||||
} else {
|
||||
float rcFactor = (ABS(rcCommand[axis]) / 500.0f);
|
||||
|
||||
superExpoFactor = (axis == YAW) ? rxConfig->superExpoFactorYaw : rxConfig->superExpoFactor;
|
||||
propFactor = constrainf(1.0f - ((superExpoFactor / 100.0f) * (ABS(rcCommand[axis]) / 500.0f)), 0.0f, 1.0f);
|
||||
propFactor = constrainf(1.0f - ((superExpoFactor / 100.0f) * rcFactor * rcFactor * rcFactor), 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
return propFactor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue