Skip to content

Commit

Permalink
Implement iacByTpsTaper (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreika-git authored and rusefi committed Nov 3, 2017
1 parent ce76ba1 commit 7ec0eeb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions firmware/controllers/idle_thread.cpp
Expand Up @@ -226,6 +226,11 @@ static msg_t ivThread(int param) {
} else {
iacPosition = autoIdle(cltCorrection);
}

percent_t tpsPos = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE);
float additionalAir = (float)engineConfiguration->iacByTpsTaper;
iacPosition += interpolateClamped(0.0f, 0.0f, boardConfiguration->idlePidDeactivationTpsThreshold, additionalAir, tpsPos);

// taper transition from cranking to running (uint32_t to float conversion is safe here)
if (engineConfiguration->afterCrankingIACtaperDuration > 0)
iacPosition = interpolateClamped(lastCrankingCyclesCounter, lastCrankingIacPosition,
Expand Down

0 comments on commit 7ec0eeb

Please sign in to comment.