mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +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:
commit
c053ffc7f6
1 changed files with 2 additions and 0 deletions
|
@ -529,6 +529,7 @@ bool processRx(timeUs_t currentTimeUs)
|
||||||
if (ARMING_FLAG(ARMED)
|
if (ARMING_FLAG(ARMED)
|
||||||
&& pidConfig()->runaway_takeoff_prevention
|
&& pidConfig()->runaway_takeoff_prevention
|
||||||
&& !runawayTakeoffCheckDisabled
|
&& !runawayTakeoffCheckDisabled
|
||||||
|
&& !flipOverAfterCrashMode
|
||||||
&& !STATE(FIXED_WING)) {
|
&& !STATE(FIXED_WING)) {
|
||||||
|
|
||||||
// Determine if we're in "flight"
|
// Determine if we're in "flight"
|
||||||
|
@ -765,6 +766,7 @@ static void subTaskPidController(timeUs_t currentTimeUs)
|
||||||
&& !STATE(FIXED_WING)
|
&& !STATE(FIXED_WING)
|
||||||
&& pidConfig()->runaway_takeoff_prevention
|
&& pidConfig()->runaway_takeoff_prevention
|
||||||
&& !runawayTakeoffCheckDisabled
|
&& !runawayTakeoffCheckDisabled
|
||||||
|
&& !flipOverAfterCrashMode
|
||||||
&& (!feature(FEATURE_MOTOR_STOP) || isAirmodeActive() || (calculateThrottleStatus() != THROTTLE_LOW))) {
|
&& (!feature(FEATURE_MOTOR_STOP) || isAirmodeActive() || (calculateThrottleStatus() != THROTTLE_LOW))) {
|
||||||
|
|
||||||
const float runawayTakeoffThreshold = pidConfig()->runaway_takeoff_threshold * 10.0f;
|
const float runawayTakeoffThreshold = pidConfig()->runaway_takeoff_threshold * 10.0f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue