From 689726c8014893c6e491fce5b80ed4afdaf871af Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 14 Jan 2019 00:20:50 -0500 Subject: [PATCH] enjoying C++11 --- firmware/controllers/trigger/decoders/trigger_structure.cpp | 1 - firmware/controllers/trigger/decoders/trigger_structure.h | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index b325d956cc..e0a7d71186 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -52,7 +52,6 @@ trigger_shape_helper::trigger_shape_helper() { TriggerShape::TriggerShape() : wave(switchTimesBuffer, NULL) { - version = 0; initialize(OM_NONE, false); wave.channels = h.channels; diff --git a/firmware/controllers/trigger/decoders/trigger_structure.h b/firmware/controllers/trigger/decoders/trigger_structure.h index a6b09ee5d9..eed32d1560 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.h +++ b/firmware/controllers/trigger/decoders/trigger_structure.h @@ -86,6 +86,10 @@ public: void findTriggerPosition(event_trigger_position_s *position, angle_t angleOffset DEFINE_CONFIG_PARAM(angle_t, globalTriggerAngleOffset)); + /** + * Simplest trigger shape does not require any synchronization - for example if there is only + * one primary channel tooth each raising (or falling depedning on configuration) front would synchronize + */ bool isSynchronizationNeeded; /** * this flag tells us if we should ignore events on second input channel @@ -101,7 +105,7 @@ public: * this variable is incremented after each trigger shape redefinition * See also */ - int version; + int version = 0; /** * duty cycle for each individual trigger channel