mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Merge pull request #6113 from etracer65/turtle_mode_disarm_cleanup
Only reset motor directon on disarming when crash flip mode was active
This commit is contained in:
commit
319b85777b
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