mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Disable Airmode fully when airmode not active // Adjust default setpoints / pids
This commit is contained in:
parent
42cbbbb681
commit
d8f03693f7
1 changed files with 8 additions and 4 deletions
|
@ -573,11 +573,15 @@ void mixTable(pidProfile_t *pidProfile)
|
|||
for (int i = 0; i < motorCount; i++) {
|
||||
motorMix[i] /= motorMixRange;
|
||||
}
|
||||
// Get the maximum correction by setting offset to center
|
||||
throttle = 0.5f;
|
||||
// Get the maximum correction by setting offset to center when airmode enabled
|
||||
if (isAirmodeActive()) {
|
||||
throttle = 0.5f;
|
||||
}
|
||||
} else {
|
||||
float throttleLimitOffset = motorMixRange / 2.0f;
|
||||
throttle = constrainf(throttle, 0.0f + throttleLimitOffset, 1.0f - throttleLimitOffset);
|
||||
if (isAirmodeActive()) { // Only automatically adjust throttle during airmode scenario
|
||||
float throttleLimitOffset = motorMixRange / 2.0f;
|
||||
throttle = constrainf(throttle, 0.0f + throttleLimitOffset, 1.0f - throttleLimitOffset);
|
||||
}
|
||||
}
|
||||
|
||||
// Now add in the desired throttle, but keep in a range that doesn't clip adjusted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue