1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00

Re-name ezDisarm variables and tidying up (#13835)

* just re-naming variables and tidying up

* change name to landing_disarm_threshold
This commit is contained in:
ctzsnooze 2024-08-21 17:01:49 +10:00 committed by GitHub
parent 8feb741e17
commit dd73ce4dd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 15 deletions

View file

@ -236,7 +236,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
.spa_center = { 0, 0, 0 },
.spa_width = { 0, 0, 0 },
.spa_mode = { 0, 0, 0 },
.ez_landing_disarm_threshold = 0 ,
.landing_disarm_threshold = 0, // relatively safe values are around 100
);
#ifndef USE_D_MIN
@ -780,7 +780,7 @@ static FAST_CODE_NOINLINE void disarmOnImpact(void)
// if all sticks are within 5% of center, and throttle low, check accDelta for impacts
// threshold should be high enough to avoid unwanted disarms in the air on throttle chops
if (isAirmodeActivated() && getMaxRcDeflectionAbs() < 0.05f && mixerGetRcThrottle() < 0.05f &&
fabsf(acc.accDelta) > pidRuntime.ezLandingDisarmThreshold) {
fabsf(acc.accDelta) > pidRuntime.landingDisarmThreshold) {
// disarm on accDelta transients
setArmingDisabled(ARMING_DISABLED_ARM_SWITCH);
disarm(DISARM_REASON_LANDING);