diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index e059ccecac..5ded3a6a0c 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1285,11 +1285,6 @@ void refreshTriggerShape(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) { #if EFI_ENGINE_CONTROL || defined(__DOXYGEN__) engine->triggerCentral.triggerShape.initializeTriggerShape(logger PASS_ENGINE_PARAMETER_SUFFIX); #endif - if (engine->triggerCentral.triggerShape.getSize() == 0) { - firmwareError(CUSTOM_ERR_TRIGGER_ZERO, "triggerShape size is zero"); - return; - } - engine->engineCycleEventCount = engine->triggerCentral.triggerShape.getLength(); } void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) { diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 3a33daa13e..115a1090d7 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -580,6 +580,12 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET */ initState.reset(); calculateTriggerSynchPoint(&initState PASS_ENGINE_PARAMETER_SUFFIX); + + if (engine->triggerCentral.triggerShape.getSize() == 0) { + firmwareError(CUSTOM_ERR_TRIGGER_ZERO, "triggerShape size is zero"); + return; + } + engine->engineCycleEventCount = getLength(); } version++;