diff --git a/firmware/controllers/trigger/decoders/trigger_mazda.cpp b/firmware/controllers/trigger/decoders/trigger_mazda.cpp index 5ac9a20197..0e9a172bdf 100644 --- a/firmware/controllers/trigger/decoders/trigger_mazda.cpp +++ b/firmware/controllers/trigger/decoders/trigger_mazda.cpp @@ -28,9 +28,9 @@ void initializeMazdaMiataNaShape(TriggerWaveform *s) { s->initialize(FOUR_STROKE_CAM_SENSOR); // nominal gap is 0.325 - s->setTriggerSynchronizationGap2(0.1, 0.45); + s->setTriggerSynchronizationGap2(0.1, 0.5); // nominal gap is ~1.52 - s->setSecondTriggerSynchronizationGap2(1.2, 1.8); + s->setSecondTriggerSynchronizationGap2(0.6, 2.3); s->useRiseEdge = false; @@ -185,9 +185,9 @@ void initializeMazdaMiataVVtCamShape(TriggerWaveform *s) { s->initialize(FOUR_STROKE_CAM_SENSOR); // Nominal gap is 8.92 - s->setTriggerSynchronizationGap2(7, 13); + s->setTriggerSynchronizationGap2(6, 20); // Nominal gap is 0.128 - s->setSecondTriggerSynchronizationGap2(0.06f, 0.16f); + s->setSecondTriggerSynchronizationGap2(0.04f, 0.2f); s->addEvent720(325, T_PRIMARY, TV_FALL); s->addEvent720(360, T_PRIMARY, TV_RISE); diff --git a/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp b/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp index dd6281a3a7..62a85a3177 100644 --- a/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp +++ b/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp @@ -19,7 +19,7 @@ TEST(cranking, realCrankingFromFile) { ssize_t read; - for (int i = 0; i < 23; i++) { + for (int i = 0; i < 11; i++) { reader.readLine(ð); } @@ -29,9 +29,9 @@ TEST(cranking, realCrankingFromFile) { // This tooth should be first sync point reader.readLine(ð); - EXPECT_EQ(232, GET_RPM())<< reader.lineIndex() << " @ 1"; + EXPECT_EQ(228, GET_RPM())<< reader.lineIndex() << " @ 1"; - for (int i = 0; i < 30; i++) { + for (int i = 0; i < 42; i++) { reader.readLine(ð); } ASSERT_EQ(224, GET_RPM())<< reader.lineIndex();