1
0
Fork 0
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:
borisbstyle 2016-05-30 13:02:41 +02:00
parent fb7cfffdeb
commit 754982f480
2 changed files with 62 additions and 1 deletions

View file

@ -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;