mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Only reset motor directon on disarming when crash flip mode was active
Previous logic always reset the motor direction if the crash flip mode was configured.
This commit is contained in:
parent
11d8171c36
commit
3e706224c9
1 changed files with 4 additions and 5 deletions
|
@ -329,13 +329,12 @@ void disarm(void)
|
|||
#endif
|
||||
BEEP_OFF;
|
||||
#ifdef USE_DSHOT
|
||||
if (isMotorProtocolDshot() && isModeActivationConditionPresent(BOXFLIPOVERAFTERCRASH) && !feature(FEATURE_3D)) {
|
||||
flipOverAfterCrashMode = false;
|
||||
if (!feature(FEATURE_3D)) {
|
||||
pwmWriteDshotCommand(ALL_MOTORS, getMotorCount(), DSHOT_CMD_SPIN_DIRECTION_NORMAL, false);
|
||||
}
|
||||
if (isMotorProtocolDshot() && flipOverAfterCrashMode && !feature(FEATURE_3D)) {
|
||||
pwmWriteDshotCommand(ALL_MOTORS, getMotorCount(), DSHOT_CMD_SPIN_DIRECTION_NORMAL, false);
|
||||
}
|
||||
#endif
|
||||
flipOverAfterCrashMode = false;
|
||||
|
||||
// if ARMING_DISABLED_RUNAWAY_TAKEOFF is set then we want to play it's beep pattern instead
|
||||
if (!(getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) {
|
||||
beeper(BEEPER_DISARMING); // emit disarm tone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue