From f50ed9f76352f24c3f31b0ea3aa60dea8373c700 Mon Sep 17 00:00:00 2001 From: Bryce Johnson Date: Sun, 1 Apr 2018 21:36:27 -0500 Subject: [PATCH] Change crashflip to normal on disarm (#5594) --- src/main/fc/fc_core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index 7b656dc13..c9ebd1640 100644 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -289,6 +289,17 @@ void disarm(void) } #endif 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 (!(getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) { beeper(BEEPER_DISARMING); // emit disarm tone