From 0098a3d4b95a5e8d704611b78cc90c2f775480be Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 1 Apr 2023 15:40:24 -0400 Subject: [PATCH] Clean-up all the 4g drama #5213 --- firmware/config/engines/mitsubishi.cpp | 2 +- firmware/controllers/algo/engine_configuration.cpp | 2 -- unit_tests/tests/trigger/test_real_4g93.cpp | 2 +- unit_tests/tests/trigger/test_trigger_decoder.cpp | 11 +---------- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/firmware/config/engines/mitsubishi.cpp b/firmware/config/engines/mitsubishi.cpp index fa64d1557c..4ee24c60a6 100644 --- a/firmware/config/engines/mitsubishi.cpp +++ b/firmware/config/engines/mitsubishi.cpp @@ -15,7 +15,7 @@ void setMitsubishiConfiguration() { - engineConfiguration->trigger.type = TT_MITSUBISHI_4G93; // same trigger as 4G63? + engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA; // same trigger as 4G63? engineConfiguration->specs.cylindersCount = 4; engineConfiguration->specs.displacement = 1.800; diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 61e8459240..b970790c66 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -942,8 +942,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e setFrankensoMazdaMiataNA8Configuration(); break; case MITSU_4G93: - setMitsubishiConfiguration(); - break; case FORD_INLINE_6_1995: setFordInline6(); break; diff --git a/unit_tests/tests/trigger/test_real_4g93.cpp b/unit_tests/tests/trigger/test_real_4g93.cpp index f4c8941bec..d74d6c2ca7 100644 --- a/unit_tests/tests/trigger/test_real_4g93.cpp +++ b/unit_tests/tests/trigger/test_real_4g93.cpp @@ -78,7 +78,7 @@ TEST(real4g93, crankingOn11) { engineConfiguration->isPhaseSyncRequiredForIgnition = true; - eth.setTriggerType(TT_MITSUBISHI_4G93); + eth.setTriggerType(TT_MAZDA_MIATA_NA); bool gotRpm = false; while (reader.haveMore()) { diff --git a/unit_tests/tests/trigger/test_trigger_decoder.cpp b/unit_tests/tests/trigger/test_trigger_decoder.cpp index 81d89ae066..508593ff0a 100644 --- a/unit_tests/tests/trigger/test_trigger_decoder.cpp +++ b/unit_tests/tests/trigger/test_trigger_decoder.cpp @@ -152,7 +152,7 @@ static void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPo ASSERT_FALSE(t->shapeDefinitionError) << "isError"; - ASSERT_EQ(synchPointIndex, t->getTriggerWaveformSynchPointIndex()) << "synchPointIndex"; + ASSERT_EQ(synchPointIndex, t->getTriggerWaveformSynchPointIndex()) << "synchPointIndex " << msg; if (!cisnan(expectedGapRatio)) { assertEqualsM2("actual gap ratio", expectedGapRatio, initState.triggerSyncGapRatio, 0.001); } @@ -363,15 +363,6 @@ TEST(trigger, testTriggerDecoder) { testTriggerDecoder2("testCitroen", CITROEN_TU3JP, 0, 0.4833, 0); - testTriggerDecoder2("testMitsu", MITSU_4G93, 9, 0.3553, 0.3752); - { - EngineTestHelper eth(MITSU_4G93); - - - eth.persistentConfig.engineConfiguration.sensorChartMode = SC_DETAILED_RPM; - applyNonPersistentConfiguration(); - - } testTriggerDecoder2("miata 1990", MRE_MIATA_NA6_VAF, 4, 1 - 0.7015, 1 - 0.3890); testTriggerDecoder2("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994);