From a124e0b9349d7f57e3cd01831d904ebc8023ae3d Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 31 Jan 2020 01:23:01 -0500 Subject: [PATCH] date & VVT test progress --- firmware/controllers/engine_controller.cpp | 2 +- unit_tests/main.cpp | 2 +- unit_tests/tests/test_cam_vtt_input.cpp | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 68e6537881..fcccc19246 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -839,6 +839,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 201200126; + return 201200131; } #endif /* EFI_UNIT_TEST */ diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index 9ca3b7160c..20a0d9a248 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -41,7 +41,7 @@ GTEST_API_ int main(int argc, char **argv) { // printTriggerDebug = true; // resizeMap(); - printf("Success 20191016\r\n"); + printf("Success 20200131\r\n"); printAllTriggers(); // printConvertedTable(); testing::InitGoogleTest(&argc, argv); diff --git a/unit_tests/tests/test_cam_vtt_input.cpp b/unit_tests/tests/test_cam_vtt_input.cpp index 396cb5152c..3bdf64336e 100644 --- a/unit_tests/tests/test_cam_vtt_input.cpp +++ b/unit_tests/tests/test_cam_vtt_input.cpp @@ -124,7 +124,17 @@ TEST(sensors, testNB2CamInput) { } ASSERT_EQ(1200, GET_RPM()) << "testNB2CamInput RPM"; + // this would be ignored since we only consude one kind the other kind of fronts here hwHandleVvtCamSignal(TV_FALL, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); eth.moveTimeForwardUs(MS2US(20)); + // this would be be first VVT signal - gap duration would be calculated against 'DEEP_IN_THE_PAST_SECONDS' initial value + hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); + + eth.moveTimeForwardUs(MS2US(20)); + // this second important front would give us first real VVT gap duration + hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); + + eth.moveTimeForwardUs(MS2US(130)); + // this third important front would give us first comparison between two real gaps hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); }