Skip to content

Commit

Permalink
Merge pull request #6845 from kernel-machine/turtle-mode-bugfix
Browse files Browse the repository at this point in the history
Turtle mode issue fix
  • Loading branch information
DzikuVx committed Apr 18, 2021
2 parents 2a3ef6e + fa9184b commit 7f04e0f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/main/fc/fc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,20 +497,6 @@ void tryArm(void)
{
updateArmingStatus();

#ifdef USE_DSHOT
if (
STATE(MULTIROTOR) &&
IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH) &&
emergencyArmingCanOverrideArmingDisabled() &&
isMotorProtocolDshot() &&
!FLIGHT_MODE(FLIP_OVER_AFTER_CRASH)
) {
sendDShotCommand(DSHOT_CMD_SPIN_DIRECTION_REVERSED);
ENABLE_ARMING_FLAG(ARMED);
enableFlightMode(FLIP_OVER_AFTER_CRASH);
return;
}
#endif
#ifdef USE_PROGRAMMING_FRAMEWORK
if (
!isArmingDisabled() ||
Expand All @@ -527,6 +513,21 @@ void tryArm(void)
return;
}

#ifdef USE_DSHOT
if (
STATE(MULTIROTOR) &&
IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH) &&
emergencyArmingCanOverrideArmingDisabled() &&
isMotorProtocolDshot() &&
!FLIGHT_MODE(FLIP_OVER_AFTER_CRASH)
) {
sendDShotCommand(DSHOT_CMD_SPIN_DIRECTION_REVERSED);
ENABLE_ARMING_FLAG(ARMED);
enableFlightMode(FLIP_OVER_AFTER_CRASH);
return;
}
#endif

#if defined(USE_NAV)
// If nav_extra_arming_safety was bypassed we always
// allow bypassing it even without the sticks set
Expand Down

0 comments on commit 7f04e0f

Please sign in to comment.