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

Merge pull request #5176 from etracer65/runaway_takeoff_disable_crashflip

Disable runaway takeoff when crash-flip mode is active
This commit is contained in:
Michael Keller 2018-02-14 23:19:57 +13:00 committed by GitHub
commit c053ffc7f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;