mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Merge pull request #9728 from etracer65/dynamic_idle_rpmfilter_check
This commit is contained in:
commit
393a432927
2 changed files with 9 additions and 5 deletions
|
@ -522,6 +522,14 @@ static void validateAndFixConfig(void)
|
||||||
&& motorConfig()->dev.useDshotTelemetry) {
|
&& motorConfig()->dev.useDshotTelemetry) {
|
||||||
motorConfigMutable()->dev.useDshotTelemetry = false;
|
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_TELEMETRY
|
||||||
#endif // USE_DSHOT
|
#endif // USE_DSHOT
|
||||||
|
|
||||||
|
|
|
@ -355,11 +355,7 @@ void initEscEndpoints(void)
|
||||||
void mixerInitProfile(void)
|
void mixerInitProfile(void)
|
||||||
{
|
{
|
||||||
#ifdef USE_DYN_IDLE
|
#ifdef USE_DYN_IDLE
|
||||||
if (motorConfig()->dev.useDshotTelemetry) {
|
idleMinMotorRps = currentPidProfile->idle_min_rpm * 100.0f / 60.0f;
|
||||||
idleMinMotorRps = currentPidProfile->idle_min_rpm * 100.0f / 60.0f;
|
|
||||||
} else {
|
|
||||||
idleMinMotorRps = 0;
|
|
||||||
}
|
|
||||||
idleMaxIncrease = currentPidProfile->idle_max_increase * 0.001f;
|
idleMaxIncrease = currentPidProfile->idle_max_increase * 0.001f;
|
||||||
idleP = currentPidProfile->idle_p * 0.0001f;
|
idleP = currentPidProfile->idle_p * 0.0001f;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue