1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 09:16:07 +03:00

Prevent runaway takeoff detection during GPS Rescue flight mode

Addesses the possible edge case of runaway takeoff detection still being active and getting triggered by the quick yaw turn when GPS Rescue is activated.
This commit is contained in:
Bruce Luckcuck 2019-09-11 12:20:36 -04:00
parent 2a18209492
commit 7c52886b22

View file

@ -1017,6 +1017,7 @@ static FAST_CODE void subTaskPidController(timeUs_t currentTimeUs)
&& !runawayTakeoffCheckDisabled
&& !flipOverAfterCrashActive
&& !runawayTakeoffTemporarilyDisabled
&& !FLIGHT_MODE(GPS_RESCUE_MODE) // disable Runaway Takeoff triggering if GPS Rescue is active
&& (!featureIsEnabled(FEATURE_MOTOR_STOP) || airmodeIsEnabled() || (calculateThrottleStatus() != THROTTLE_LOW))) {
if (((fabsf(pidData[FD_PITCH].Sum) >= RUNAWAY_TAKEOFF_PIDSUM_THRESHOLD)