1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Fix arming on Low Throttle when 3D Mode On switch disabled

This commit is contained in:
borisbstyle 2016-04-04 23:28:29 +02:00
parent c694c67890
commit 5290e4be56
3 changed files with 80 additions and 4 deletions

View file

@ -113,10 +113,13 @@ bool areSticksInApModePosition(uint16_t ap_mode)
throttleStatus_e calculateThrottleStatus(rxConfig_t *rxConfig, uint16_t deadband3d_throttle)
{
if (feature(FEATURE_3D) && (rcData[THROTTLE] > (rxConfig->midrc - deadband3d_throttle) && rcData[THROTTLE] < (rxConfig->midrc + deadband3d_throttle)))
return THROTTLE_LOW;
else if (!feature(FEATURE_3D) && (rcData[THROTTLE] < rxConfig->mincheck))
return THROTTLE_LOW;
if (feature(FEATURE_3D) && !IS_RC_MODE_ACTIVE(BOX3DDISABLESWITCH)) {
if ((rcData[THROTTLE] > (rxConfig->midrc - deadband3d_throttle) && rcData[THROTTLE] < (rxConfig->midrc + deadband3d_throttle)))
return THROTTLE_LOW;
} else {
if (rcData[THROTTLE] < rxConfig->mincheck)
return THROTTLE_LOW;
}
return THROTTLE_HIGH;
}