From f16173b4dd1f97d8625b645907ea58a575b02993 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Mon, 2 Aug 2021 04:02:45 -0700 Subject: [PATCH] call handleShaftSignal (#3097) --- unit_tests/engine_test_helper.cpp | 4 ++-- unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index b81e14998e..30e3e6b041 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -174,7 +174,7 @@ void EngineTestHelper::firePrimaryTriggerRise() { Engine *engine = &this->engine; EXPAND_Engine; LogTriggerTooth(SHAFT_PRIMARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); - engine->triggerCentral.handleShaftSignal(SHAFT_PRIMARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); + handleShaftSignal(0, true, nowNt PASS_ENGINE_PARAMETER_SUFFIX); } void EngineTestHelper::firePrimaryTriggerFall() { @@ -182,7 +182,7 @@ void EngineTestHelper::firePrimaryTriggerFall() { Engine *engine = &this->engine; EXPAND_Engine; LogTriggerTooth(SHAFT_PRIMARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); - engine->triggerCentral.handleShaftSignal(SHAFT_PRIMARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); + handleShaftSignal(0, false, nowNt PASS_ENGINE_PARAMETER_SUFFIX); } void EngineTestHelper::fireTriggerEventsWithDuration(float durationMs) { diff --git a/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp b/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp index fbd1b8b86d..529ae3e2a7 100644 --- a/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp +++ b/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp @@ -30,7 +30,7 @@ static void fireTriggerEvent(EngineTestHelper*eth, double timestampS, trigger_wh EXPAND_Engine; timeNowUs = 1'000'000 * timestampS; printf("MIATANA: posting time=%d event=%d\n", timeNowUs, event); - engine->triggerCentral.handleShaftSignal(event, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); + hwHandleShaftSignal((int)channel, !isFall, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); } TEST(cranking, hardcodedRealCranking) {