diff --git a/firmware/controllers/algo/engine2.cpp b/firmware/controllers/algo/engine2.cpp index 612ce8e17b..faa2360e38 100644 --- a/firmware/controllers/algo/engine2.cpp +++ b/firmware/controllers/algo/engine2.cpp @@ -167,7 +167,9 @@ void EngineState::periodicFastCallback() { float baseAdvance = getAdvance(rpm, ignitionLoad) * engine->ignitionState.luaTimingMult + engine->ignitionState.luaTimingAdd; float correctedIgnitionAdvance = baseAdvance // Pull any extra timing for knock retard - + engine->module()->getKnockRetard(); + - engine->module()->getKnockRetard() + // Degrees of timing REMOVED from actual timing during soft RPM limit window + - getLimpManager()->getLimitingTimingRetard(); // these fields are scaled_channel so let's only use for observability, with a local variables holding value while it matters locally engine->ignitionState.baseIgnitionAdvance = baseAdvance; engine->ignitionState.correctedIgnitionAdvance = correctedIgnitionAdvance; diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index 0b907f68dd..8d8b5cde23 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -100,9 +100,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_ angle_t correctedSparkAngle = // Negate because timing *before* TDC, and we schedule *after* TDC - - getEngineState()->timingAdvance[event->cylinderNumber] - // Degrees of timing REMOVED from actual timing during soft RPM limit window - + getLimpManager()->getLimitingTimingRetard(); + - getEngineState()->timingAdvance[event->cylinderNumber]; engine->ignitionState.perCylinderTiming[event->cylinderIndex] = correctedSparkAngle;