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

Merge pull request #9728 from etracer65/dynamic_idle_rpmfilter_check

This commit is contained in:
Michael Keller 2020-04-25 12:56:23 +12:00 committed by mikeller
parent 72f501243c
commit 43b7fc6021
2 changed files with 9 additions and 5 deletions

View file

@ -514,6 +514,14 @@ static void validateAndFixConfig(void)
&& motorConfig()->dev.useDshotTelemetry) {
motorConfigMutable()->dev.useDshotTelemetry = false;
}
#if defined(USE_DYN_IDLE)
if (!isRpmFilterEnabled()) {
for (unsigned i = 0; i < PID_PROFILE_COUNT; i++) {
pidProfilesMutable(i)->idle_min_rpm = 0;
}
}
#endif // USE_DYN_IDLE
#endif // USE_DSHOT_TELEMETRY
#endif // USE_DSHOT

View file

@ -350,11 +350,7 @@ void initEscEndpoints(void)
void mixerInitProfile(void)
{
#ifdef USE_DYN_IDLE
if (motorConfig()->dev.useDshotTelemetry) {
idleMinMotorRps = currentPidProfile->idle_min_rpm * 100.0f / 60.0f;
} else {
idleMinMotorRps = 0;
}
idleMinMotorRps = currentPidProfile->idle_min_rpm * 100.0f / 60.0f;
idleMaxIncrease = currentPidProfile->idle_max_increase * 0.001f;
idleP = currentPidProfile->idle_p * 0.0001f;
#endif