1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

scale idleThrottleOffset correctly

This commit is contained in:
Thorsten Laux 2019-08-04 14:34:34 +02:00
parent 096ca9f2d7
commit 5767102889

View file

@ -603,7 +603,7 @@ static void calculateThrottleAndCurrentMotorEndpoints(timeUs_t currentTimeUs)
const float pidSum = constrainf(idleP * error, -currentPidProfile->idle_pid_limit, currentPidProfile->idle_pid_limit);
motorRangeMinIncrease = constrainf(motorRangeMinIncrease + pidSum * pidGetDT(), 0.0f, maxIncrease);
oldMinRps = minRps;
throttle += idleThrottleOffset;
throttle += idleThrottleOffset * rcCommandThrottleRange;
DEBUG_SET(DEBUG_DYN_IDLE, 0, motorRangeMinIncrease * 1000);
DEBUG_SET(DEBUG_DYN_IDLE, 1, targetRpsChangeRate);