mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
fix incorrect throttle offset in airmode
This commit is contained in:
parent
6adfd345db
commit
fe41edd188
1 changed files with 1 additions and 2 deletions
|
@ -840,8 +840,7 @@ FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensa
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isAirmodeActive() || throttle > 0.5f) { // Only automatically adjust throttle when airmode enabled. Airmode logic is always active on high throttle
|
if (isAirmodeActive() || throttle > 0.5f) { // Only automatically adjust throttle when airmode enabled. Airmode logic is always active on high throttle
|
||||||
const float throttleLimitOffset = motorMixRange / 2.0f;
|
throttle = constrainf(throttle, -motorMixMin, 1.0f - motorMixMax);
|
||||||
throttle = constrainf(throttle, 0.0f + throttleLimitOffset, 1.0f - throttleLimitOffset);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue