instant RPM for idle control #925

This commit is contained in:
rusefi 2019-09-09 19:41:41 -04:00
parent db018723f7
commit 7676261ec6
1 changed files with 2 additions and 1 deletions

View File

@ -220,8 +220,9 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// get Target RPM for Auto-PID from a separate table
int targetRpm = getTargetRpmForIdleCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
efitick_t nowNt = getTimeNowNt();
// check if within the dead zone
int rpm = GET_RPM();
float rpm = engine->triggerCentral.triggerState.calculateInstantRpm(NULL, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
if (absI(rpm - targetRpm) <= CONFIG(idlePidRpmDeadZone)) {
engine->engineState.idle.idleState = RPM_DEAD_ZONE;
// current RPM is close enough, no need to change anything