From 64026b3d90af1b56ce9972fbab15721d52ed9f1e Mon Sep 17 00:00:00 2001 From: TurboMarian Date: Sat, 24 Dec 2022 14:41:34 +0000 Subject: [PATCH] ALS UPDATE (ETB is working) (cherry picked from commit decbf6d1615f1c15cc3e278932667a390d2539c9) --- firmware/controllers/actuators/electronic_throttle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index f55a1fd1af..cf6d872fbc 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -320,6 +320,12 @@ expected EtbController::getSetpointEtb() { percent_t targetPosition = idlePosition + getLuaAdjustment(); +#if EFI_ANTILAG_SYSTEM + if (engine->antilagController.isAntilagCondition) { + targetPosition += engineConfiguration->ALSEtbAdd; + } +#endif /* EFI_ANTILAG_SYSTEM */ + // Apply any adjustment that this throttle alone needs // Clamped to +-10 to prevent anything too wild trim = clampF(-10, getThrottleTrim(rpm, targetPosition), 10);