diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 0a2813ee3f..ef36d11495 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -899,6 +899,10 @@ void prepareShapes(DECLARE_ENGINE_PARAMETER_F) { engine_configuration2_s *engineConfiguration2 = engine->engineConfiguration2; prepareOutputSignals(PASS_ENGINE_PARAMETER_F); + engineConfiguration2->injectionEvents->addFuelEvents( + engineConfiguration->crankingInjectionMode PASS_ENGINE_PARAMETER); + + // todo: looks like this is here only for unit tests. todo: remove initializeIgnitionActions(0, 0, &engineConfiguration2->ignitionEvents[0] PASS_ENGINE_PARAMETER); } diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 86db8f4b20..dedcf51b98 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -407,8 +407,6 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F) { TRIGGER_SHAPE(triggerIndexByAngle[angle]) = triggerShapeIndex; } - engineConfiguration2->injectionEvents->addFuelEvents( - engineConfiguration->crankingInjectionMode PASS_ENGINE_PARAMETER); } #endif