mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Disable runaway takeoff when crash-flip mode is active
Prevents Runaway Takeoff Prevention from auto-disarming during crash-flip (turtle mode). Addresses an edge-case where runaway takeoff prevention might not yet have been deactivated due to a crash immediatly upon takeoff.
This commit is contained in:
parent
040c46da07
commit
84cb0b865d
1 changed files with 2 additions and 0 deletions
|
@ -529,6 +529,7 @@ bool processRx(timeUs_t currentTimeUs)
|
|||
if (ARMING_FLAG(ARMED)
|
||||
&& pidConfig()->runaway_takeoff_prevention
|
||||
&& !runawayTakeoffCheckDisabled
|
||||
&& !flipOverAfterCrashMode
|
||||
&& !STATE(FIXED_WING)) {
|
||||
|
||||
// Determine if we're in "flight"
|
||||
|
@ -765,6 +766,7 @@ static void subTaskPidController(timeUs_t currentTimeUs)
|
|||
&& !STATE(FIXED_WING)
|
||||
&& pidConfig()->runaway_takeoff_prevention
|
||||
&& !runawayTakeoffCheckDisabled
|
||||
&& !flipOverAfterCrashMode
|
||||
&& (!feature(FEATURE_MOTOR_STOP) || isAirmodeActive() || (calculateThrottleStatus() != THROTTLE_LOW))) {
|
||||
|
||||
const float runawayTakeoffThreshold = pidConfig()->runaway_takeoff_threshold * 10.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue