mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
fix iterm bug introduced in PR13127 (#13201)
fix iterm bug introduced in 13127
This commit is contained in:
parent
a88e8940aa
commit
b2ce402635
1 changed files with 9 additions and 1 deletions
|
@ -771,7 +771,15 @@ bool processRx(timeUs_t currentTimeUs)
|
|||
const bool throttleActive = calculateThrottleStatus() != THROTTLE_LOW;
|
||||
const uint8_t throttlePercent = calculateThrottlePercentAbs();
|
||||
const bool launchControlActive = isLaunchControlActive();
|
||||
airmodeIsActivated = airmodeIsEnabled() && ARMING_FLAG(ARMED) && throttlePercent >= rxConfig()->airModeActivateThreshold && !launchControlActive;
|
||||
|
||||
if (airmodeIsEnabled() && ARMING_FLAG(ARMED) && !launchControlActive) {
|
||||
// once throttle exceeds activate threshold, airmode latches active until disarm
|
||||
if (throttlePercent >= rxConfig()->airModeActivateThreshold) {
|
||||
airmodeIsActivated = true;
|
||||
}
|
||||
} else {
|
||||
airmodeIsActivated = false;
|
||||
}
|
||||
|
||||
if (ARMING_FLAG(ARMED) && (airmodeIsActivated || throttleActive || launchControlActive || isFixedWing())) {
|
||||
pidSetItermReset(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue