diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 6f0fe92446..7373da3d6a 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -51,7 +51,7 @@ FsioState::FsioState() { #endif } -void Engine::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMETER_SUFFIX) { +void Engine::eInitializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMETER_SUFFIX) { #if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT #if !EFI_UNIT_TEST // we have a confusing threading model so some synchronization would not hurt @@ -310,7 +310,12 @@ injection_mode_e Engine::getCurrentInjectionMode(DECLARE_ENGINE_PARAMETER_SIGNAT // see also in TunerStudio project '[doesTriggerImplyOperationMode] tag static bool doesTriggerImplyOperationMode(trigger_type_e type) { - return type != TT_TOOTHED_WHEEL && type != TT_TOOTHED_WHEEL_60_2 && type != TT_TOOTHED_WHEEL_36_1; + return type != TT_TOOTHED_WHEEL + && type != TT_ONE + && type != TT_ONE_PLUS_ONE + && type != TT_3_1_CAM + && type != TT_TOOTHED_WHEEL_60_2 + && type != TT_TOOTHED_WHEEL_36_1; } operation_mode_e Engine::getOperationMode(DECLARE_ENGINE_PARAMETER_SIGNATURE) { @@ -318,7 +323,6 @@ operation_mode_e Engine::getOperationMode(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return engineConfiguration->ambiguousOperationMode; } - /** * The idea of this method is to execute all heavy calculations in a lower-priority thread, * so that trigger event handler/IO scheduler tasks are faster. diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index e66693190c..ec236eacfb 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -200,7 +200,7 @@ public: void periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE); void periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE); void updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE); - void initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMETER_SUFFIX); + void eInitializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMETER_SUFFIX); bool clutchUpState = false; bool clutchDownState = false; diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 0b1182048d..6734f72bcf 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1313,7 +1313,7 @@ void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_S assertEngineReference(); #if EFI_ENGINE_CONTROL - ENGINE(initializeTriggerShape(logger PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(eInitializeTriggerShape(logger PASS_ENGINE_PARAMETER_SUFFIX)); #endif #if EFI_FSIO diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 33b030eea1..32db0c3a8b 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -463,7 +463,7 @@ void printAllTriggers() { engineConfiguration->ambiguousOperationMode = FOUR_STROKE_CAM_SENSOR; TriggerShape *s = &engine->triggerCentral.triggerShape; - engine->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); + engine->eInitializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); if (s->shapeDefinitionError) { printf("Trigger error %d\r\n", triggerId); @@ -693,7 +693,7 @@ void onConfigurationChangeTriggerCallback(engine_configuration_s *previousConfig assertEngineReference(); #if EFI_ENGINE_CONTROL - ENGINE(initializeTriggerShape(logger PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(eInitializeTriggerShape(logger PASS_ENGINE_PARAMETER_SUFFIX)); engine->triggerCentral.resetAccumSignalData(); #endif } diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index 9fe83f1290..02ce9a4336 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -74,7 +74,7 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb //todo: reuse initPeriodicEvents(PASS_ENGINE_PARAMETER_SIGNATURE) method engine->periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE); - engine->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); + engine->eInitializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); initRpmCalculator(NULL PASS_ENGINE_PARAMETER_SUFFIX); initMainEventListener(NULL PASS_ENGINE_PARAMETER_SUFFIX); } @@ -184,7 +184,7 @@ void EngineTestHelper::applyTriggerShape() { Engine *engine = &this->engine; EXPAND_Engine - ENGINE(initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(eInitializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX)); incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE); } diff --git a/unit_tests/tests/test_fuel_map.cpp b/unit_tests/tests/test_fuel_map.cpp index bae551e223..35be7f6e4c 100644 --- a/unit_tests/tests/test_fuel_map.cpp +++ b/unit_tests/tests/test_fuel_map.cpp @@ -167,7 +167,7 @@ TEST(misc, testAngleResolver) { engineConfiguration->globalTriggerAngleOffset = 175; TriggerShape * ts = &engine->triggerCentral.triggerShape; - engine->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); + engine->eInitializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); assertEqualsM("index 2", 52.76, ts->eventAngles[3]); // this angle is relation to synch point assertEqualsM("time 2", 0.3233, ts->wave.getSwitchTime(2));