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
|
@ -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…
Reference in New Issue