From 35886233834a1b5480fef6fbcf4ad11ac7d98383 Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Wed, 7 Sep 2016 15:34:15 +0200 Subject: [PATCH] Throttle Jump Limit only applied to accelerating situation --- src/main/flight/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 6111a9883c..07418470a3 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -864,13 +864,13 @@ void mixTable(void *pidProfilePtr) // Anti Desync feature for ESC's. Limit rapid throttle changes if (escAndServoConfig->maxEscThrottleJumpMs) { - const int16_t maxThrottleStep = constrain(escAndServoConfig->maxEscThrottleJumpMs / (1000 / targetPidLooptime), 5, 10000); + const int16_t maxThrottleStep = constrain(escAndServoConfig->maxEscThrottleJumpMs / (1000 / targetPidLooptime), 2, 10000); // Only makes sense when it's within the range if (maxThrottleStep < throttleRange) { static int16_t motorPrevious[MAX_SUPPORTED_MOTORS]; - motor[i] = constrain(motor[i], motorPrevious[i] - maxThrottleStep, motorPrevious[i] + maxThrottleStep); + motor[i] = constrain(motor[i], escAndServoConfig->minthrottle, motorPrevious[i] + maxThrottleStep); // Only limit accelerating situation motorPrevious[i] = motor[i]; } }