From 2585e4cad7ccf903bd8fd370dcf578bbdd225034 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 25 Dec 2018 21:05:06 -0500 Subject: [PATCH] #625 --- firmware/controllers/algo/engine_configuration.cpp | 2 +- firmware/controllers/trigger/trigger_central.cpp | 4 ++-- unit_tests/engine_test_helper.cpp | 4 ++-- unit_tests/test_fuel_map.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 0ac7f54fcf..4d668493ab 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1332,7 +1332,7 @@ void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_S assertEngineReference(); #if EFI_ENGINE_CONTROL || defined(__DOXYGEN__) - TRIGGER_SHAPE(initializeTriggerShape(logger, engineConfiguration->useOnlyRisingEdgeForTrigger PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(initializeTriggerShape(logger PASS_ENGINE_PARAMETER_SUFFIX)); #endif #if EFI_FSIO || defined(__DOXYGEN__) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 099c7718b7..71f20a6fb8 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -468,7 +468,7 @@ void printAllTriggers() { engineConfiguration->operationMode = FOUR_STROKE_CAM_SENSOR; TriggerShape *s = &engine->triggerCentral.triggerShape; - s->initializeTriggerShape(NULL, engineConfiguration->useOnlyRisingEdgeForTrigger PASS_ENGINE_PARAMETER_SUFFIX); + engine->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); if (s->shapeDefinitionError) { printf("Trigger error %d\r\n", triggerId); @@ -676,7 +676,7 @@ void onConfigurationChangeTriggerCallback(engine_configuration_s *previousConfig assertEngineReference(); #if EFI_ENGINE_CONTROL || defined(__DOXYGEN__) - TRIGGER_SHAPE(initializeTriggerShape(logger, engineConfiguration->useOnlyRisingEdgeForTrigger PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(initializeTriggerShape(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 fddb879047..57b4766443 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -64,7 +64,7 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persiste engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE); prepareTimingMap(PASS_ENGINE_PARAMETER_SIGNATURE); - TRIGGER_SHAPE(initializeTriggerShape(NULL, engineConfiguration->useOnlyRisingEdgeForTrigger PASS_ENGINE_PARAMETER_SUFFIX)); + engine->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX); engine->triggerCentral.addEventListener(rpmShaftPositionCallback, "rpm reporter", engine); engine->triggerCentral.addEventListener(mainTriggerCallback, "main loop", engine); resetTriggerConfigChangedForUnitTest(); @@ -121,7 +121,7 @@ void EngineTestHelper::applyTriggerShape() { EXPAND_Engine - TRIGGER_SHAPE(initializeTriggerShape(NULL, engineConfiguration->useOnlyRisingEdgeForTrigger PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX)); incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE); } diff --git a/unit_tests/test_fuel_map.cpp b/unit_tests/test_fuel_map.cpp index 1f7c1e6c2c..2ef2dd347c 100644 --- a/unit_tests/test_fuel_map.cpp +++ b/unit_tests/test_fuel_map.cpp @@ -170,7 +170,7 @@ void testAngleResolver(void) { engineConfiguration->globalTriggerAngleOffset = 175; TriggerShape * ts = &engine->triggerCentral.triggerShape; - ts->initializeTriggerShape(NULL, engineConfiguration->useOnlyRisingEdgeForTrigger PASS_ENGINE_PARAMETER_SUFFIX); + engine->initializeTriggerShape(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));