1
0
Fork 0
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:
Dominic Clifton 2014-12-26 20:22:13 +00:00
parent c0dbde0318
commit 347b156727
3 changed files with 11 additions and 2 deletions

View file

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