mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Unified BOX3DDISABLE
and BOX3DONASWITCH
switches.
This commit is contained in:
parent
a301a0019e
commit
232fc4e8de
9 changed files with 23 additions and 23 deletions
|
@ -91,7 +91,8 @@ PG_RESET_TEMPLATE(flight3DConfig_t, flight3DConfig,
|
|||
.deadband3d_low = 1406,
|
||||
.deadband3d_high = 1514,
|
||||
.neutral3d = 1460,
|
||||
.deadband3d_throttle = 50
|
||||
.deadband3d_throttle = 50,
|
||||
.switched_mode3d = false
|
||||
);
|
||||
|
||||
bool isUsingSticksForArming(void)
|
||||
|
@ -107,7 +108,7 @@ bool areSticksInApModePosition(uint16_t ap_mode)
|
|||
throttleStatus_e calculateThrottleStatus(void)
|
||||
{
|
||||
if (feature(FEATURE_3D)) {
|
||||
if (IS_RC_MODE_ACTIVE(BOX3DDISABLE) || isModeActivationConditionPresent(BOX3DONASWITCH)) {
|
||||
if (IS_RC_MODE_ACTIVE(BOX3D) || flight3DConfig()->switched_mode3d) {
|
||||
if (rcData[THROTTLE] < rxConfig()->mincheck) {
|
||||
return THROTTLE_LOW;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue