diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 957d8433b2..d5150a9d27 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -400,8 +400,6 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET const trigger_config_s *triggerConfig = &engineConfiguration->trigger; - clear(); - switch (triggerConfig->type) { case TT_TOOTHED_WHEEL: diff --git a/firmware/controllers/trigger/trigger_structure.cpp b/firmware/controllers/trigger/trigger_structure.cpp index 5553db10a4..c1804072aa 100644 --- a/firmware/controllers/trigger/trigger_structure.cpp +++ b/firmware/controllers/trigger/trigger_structure.cpp @@ -35,7 +35,6 @@ trigger_shape_helper::trigger_shape_helper() { TriggerShape::TriggerShape() : wave(switchTimesBuffer, NULL) { - clear(); initialize(OM_NONE, false); wave.waves = h.waves; // todo: false here, true in clear() what a mess! @@ -109,6 +108,9 @@ void TriggerShape::calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE } void TriggerShape::clear() { +} + +void TriggerShape::initialize(operation_mode_e operationMode, bool needSecondTriggerInput) { tdcPosition = 0; setTriggerSynchronizationGap(2); // todo: true here, false in constructor() what a mess! @@ -116,10 +118,7 @@ void TriggerShape::clear() { invertOnAdd = false; gapBothDirections = false; -} -void TriggerShape::initialize(operation_mode_e operationMode, bool needSecondTriggerInput) { - clear(); this->operationMode = operationMode; size = 0; this->needSecondTriggerInput = needSecondTriggerInput;