From 591dae80bd90fa1eb8ef3d419194a26aa2924395 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 5 Oct 2023 23:37:58 -0400 Subject: [PATCH] Retarding exhaust VVT which drives DI pump causes issues #5596 only: placing angle position into proper range --- firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp index 9765fc32d4..987171675c 100644 --- a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp +++ b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp @@ -217,6 +217,8 @@ void HpfpController::scheduleNextCycle() { angleAboveMin = angle_requested > engineConfiguration->hpfpMinAngle; if (angleAboveMin) { di_nextStart = lobe - angle_requested - m_deadtime; + wrapAngle(di_nextStart, "di_nextStart", ObdCode::CUSTOM_ERR_6557); + /** * We are good to use just one m_event instance because new events are scheduled when we turn off valve. @@ -228,6 +230,7 @@ void HpfpController::scheduleNextCycle() { // Off will be scheduled after turning the valve on } else { + wrapAngle(lobe, "lobe", ObdCode::CUSTOM_ERR_6557); // Schedule this, even if we aren't opening the valve this time, since this // will schedule the next lobe. // todo: would it have been cleaner to schedule 'scheduleNextCycle' directly?