mirror of https://github.com/rusefi/rusefi-1.git
idle_min through FSIO not working as intended
#1553 we now re-activated idle PID even in deadzone for half a second after A/C toggle
This commit is contained in:
parent
f09896fb54
commit
b1ab455f31
|
@ -315,8 +315,11 @@ static percent_t automaticIdleController(float tpsPos DECLARE_ENGINE_PARAMETER_S
|
||||||
rpm = GET_RPM();
|
rpm = GET_RPM();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #1553 we need to give FSIO variable offset or minValue a chance
|
||||||
|
bool acToggleJustTouched = (getTimeNowUs() - engine->acSwitchLastChangeTime) < MS2US(500);
|
||||||
// check if within the dead zone
|
// check if within the dead zone
|
||||||
if (absI(rpm - targetRpm) <= CONFIG(idlePidRpmDeadZone)) {
|
if (!acToggleJustTouched && absI(rpm - targetRpm) <= CONFIG(idlePidRpmDeadZone)) {
|
||||||
engine->engineState.idle.idleState = RPM_DEAD_ZONE;
|
engine->engineState.idle.idleState = RPM_DEAD_ZONE;
|
||||||
// current RPM is close enough, no need to change anything
|
// current RPM is close enough, no need to change anything
|
||||||
return engine->engineState.idle.baseIdlePosition;
|
return engine->engineState.idle.baseIdlePosition;
|
||||||
|
|
Loading…
Reference in New Issue