rusefi 2020-07-10 14:03:07 -04:00
parent 30bd081c9c
commit 1f4c632cf2
1 changed files with 4 additions and 0 deletions

View File

@ -294,6 +294,10 @@ static bool isOutOfAutomaticIdleCondition(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
* @return idle valve position percentage for automatic closed loop mode
*/
static percent_t automaticIdleController(float tpsPos DECLARE_ENGINE_PARAMETER_SUFFIX) {
// todo: move this to pid_s one day
idlePid.antiwindupFreq = engineConfiguration->idle_antiwindupFreq;
idlePid.derivativeFilterLoss = engineConfiguration->idle_derivativeFilterLoss;
if (isOutOfAutomaticIdleCondition(PASS_ENGINE_PARAMETER_SIGNATURE)) {
// Don't store old I and D terms if PID doesn't work anymore.
// Otherwise they will affect the idle position much later, when the throttle is closed.