mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Fix 3D arming checks for BOX3DDISABLE
When FEATURE_3D is on and BOX3DDISABLE is on then the normal throttle arming check is performed. When FEATURE_3D is on and BOX3DDISABLE is off then the reduced 3D throttle arming check is performed.
This commit is contained in:
parent
eadcf42650
commit
0315005445
3 changed files with 115 additions and 8 deletions
|
@ -110,15 +110,14 @@ throttleStatus_e calculateThrottleStatus(void)
|
|||
{
|
||||
if (feature(FEATURE_3D)) {
|
||||
if (IS_RC_MODE_ACTIVE(BOX3DDISABLE) || isModeActivationConditionPresent(BOX3DONASWITCH)) {
|
||||
if (rcData[THROTTLE] < rxConfig()->mincheck)
|
||||
if (rcData[THROTTLE] < rxConfig()->mincheck) {
|
||||
return THROTTLE_LOW;
|
||||
}
|
||||
} else if ((rcData[THROTTLE] > (rxConfig()->midrc - flight3DConfig()->deadband3d_throttle) && rcData[THROTTLE] < (rxConfig()->midrc + flight3DConfig()->deadband3d_throttle))) {
|
||||
return THROTTLE_LOW;
|
||||
}
|
||||
} else {
|
||||
if (rcData[THROTTLE] < rxConfig()->mincheck) {
|
||||
return THROTTLE_LOW;
|
||||
}
|
||||
} else if (rcData[THROTTLE] < rxConfig()->mincheck) {
|
||||
return THROTTLE_LOW;
|
||||
}
|
||||
|
||||
return THROTTLE_HIGH;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue