mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Disable stick command processing while ARMING_DISABLED_RUNAWAY_TAKEOFF is set
Addresses the rare possibility that if runway takeoff triggers and disarms while the pilot has the sticks in some valid stick command configuration. Prevents the stick command from processing until the craft is disarmed and the ARMING_DISABLED_RUNAWAY_TAKEOFF condition is cleared. For example, if the pilot was mid throttle and went full yaw right and runway takeoff triggered, then camera control would have be entered.
This commit is contained in:
parent
aec34a2b26
commit
2610344266
2 changed files with 4 additions and 1 deletions
|
@ -215,7 +215,7 @@ void processRcStickPositions()
|
|||
return;
|
||||
}
|
||||
|
||||
if (ARMING_FLAG(ARMED) || doNotRepeat || rcDelayMs <= STICK_DELAY_MS) {
|
||||
if (ARMING_FLAG(ARMED) || doNotRepeat || rcDelayMs <= STICK_DELAY_MS || (getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) {
|
||||
return;
|
||||
}
|
||||
doNotRepeat = true;
|
||||
|
|
|
@ -730,3 +730,6 @@ PG_REGISTER(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 2);
|
|||
void resetArmingDisabled(void) {}
|
||||
timeDelta_t getTaskDeltaTime(cfTaskId_e) { return 20000; }
|
||||
}
|
||||
armingDisableFlags_e getArmingDisableFlags(void) {
|
||||
return (armingDisableFlags_e) 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue