mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Avoid calling mwDisarm() when due to having auto_disarm_delay when using
switch to arm().
This commit is contained in:
parent
c0dbde0318
commit
347b156727
3 changed files with 11 additions and 2 deletions
|
@ -498,9 +498,12 @@ void processRx(void)
|
|||
}
|
||||
// When armed and motors aren't spinning, disarm board after delay so users without buzzer won't lose fingers.
|
||||
// mixTable constrains motor commands, so checking throttleStatus is enough
|
||||
if (ARMING_FLAG(ARMED)
|
||||
if (
|
||||
ARMING_FLAG(ARMED)
|
||||
&& feature(FEATURE_MOTOR_STOP) && !STATE(FIXED_WING)
|
||||
&& masterConfig.auto_disarm_delay != 0) {
|
||||
&& masterConfig.auto_disarm_delay != 0
|
||||
&& isUsingSticksForArming()
|
||||
) {
|
||||
if (throttleStatus == THROTTLE_LOW) {
|
||||
if ((int32_t)(disarmAt - millis()) < 0) // delay is over
|
||||
mwDisarm();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue