mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Change crashflip to normal on disarm (#5594)
This commit is contained in:
parent
db81dbe103
commit
f50ed9f763
1 changed files with 11 additions and 0 deletions
|
@ -289,6 +289,17 @@ void disarm(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
BEEP_OFF;
|
BEEP_OFF;
|
||||||
|
#ifdef USE_DSHOT
|
||||||
|
if (isMotorProtocolDshot() && isModeActivationConditionPresent(BOXFLIPOVERAFTERCRASH) && !feature(FEATURE_3D)) {
|
||||||
|
flipOverAfterCrashMode = false;
|
||||||
|
if (!feature(FEATURE_3D)) {
|
||||||
|
pwmDisableMotors();
|
||||||
|
delay(1);
|
||||||
|
pwmWriteDshotCommand(ALL_MOTORS, getMotorCount(), DSHOT_CMD_SPIN_DIRECTION_NORMAL);
|
||||||
|
pwmEnableMotors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// if ARMING_DISABLED_RUNAWAY_TAKEOFF is set then we want to play it's beep pattern instead
|
// if ARMING_DISABLED_RUNAWAY_TAKEOFF is set then we want to play it's beep pattern instead
|
||||||
if (!(getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) {
|
if (!(getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) {
|
||||||
beeper(BEEPER_DISARMING); // emit disarm tone
|
beeper(BEEPER_DISARMING); // emit disarm tone
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue