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

Make dyn_idle a conditional compile

This commit is contained in:
Thorsten Laux 2019-07-24 10:26:05 +02:00
parent b4c4757470
commit e39d5e7000
3 changed files with 7 additions and 2 deletions

View file

@ -575,7 +575,7 @@ static void calculateThrottleAndCurrentMotorEndpoints(timeUs_t currentTimeUs)
}
} else {
static float motorRangeMinIncrease = 0;
#ifdef USE_RPM_FILTER
#ifdef USE_DYN_IDLE
if (currentPidProfile->idle_hz) {
static float oldMinRpm;
const float maxIncrease = isAirmodeActivated() ? currentPidProfile->idle_max_increase * 0.001f : 0.04f;
@ -848,7 +848,9 @@ FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensa
throttle = pidCompensateThrustLinearization(throttle);
#endif
#ifdef USE_DYN_IDLE
throttle += currentPidProfile->idle_throttle * 0.001f;
#endif
#if defined(USE_THROTTLE_BOOST)
if (throttleBoost > 0.0f) {