From 7c52886b22a4257dea2a3aa95f2753bdc60c4352 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Wed, 11 Sep 2019 12:20:36 -0400 Subject: [PATCH] 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. --- src/main/fc/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/fc/core.c b/src/main/fc/core.c index 468b8617e81..928a9ecfb37 100644 --- a/src/main/fc/core.c +++ b/src/main/fc/core.c @@ -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)