1
0
Fork 0
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:
Michael Keller 2018-06-17 11:41:30 +12:00 committed by GitHub
commit 319b85777b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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