From a98f03488cd52956f9199cf64bb3b414a1ed264d Mon Sep 17 00:00:00 2001 From: rusEFI LLC Date: Mon, 22 Apr 2024 23:29:49 -0400 Subject: [PATCH] ETB_INTERMITTENT_LIMIT --- firmware/controllers/actuators/electronic_throttle.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index d1f2084bdd..f63238bdff 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -600,14 +600,18 @@ bool EtbController::checkStatus() { etbPpsErrorCounter = 0; } +#ifndef ETB_INTERMITTENT_LIMIT +#define ETB_INTERMITTENT_LIMIT 50 +#endif + TpsState localReason = TpsState::None; - if (etbTpsErrorCounter > 50) { + if (etbTpsErrorCounter > ETB_INTERMITTENT_LIMIT) { localReason = TpsState::IntermittentTps; #if EFI_SHAFT_POSITION_INPUT } else if (engineConfiguration->disableEtbWhenEngineStopped && !engine->triggerCentral.engineMovedRecently()) { localReason = TpsState::EngineStopped; #endif // EFI_SHAFT_POSITION_INPUT - } else if (etbPpsErrorCounter > 50) { + } else if (etbPpsErrorCounter > ETB_INTERMITTENT_LIMIT) { localReason = TpsState::IntermittentPps; } else if (engine->engineState.lua.luaDisableEtb) { localReason = TpsState::Lua;