diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index a2e450279b..e06eba720c 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -26,6 +26,10 @@ Release template (copy/paste this for new release): # Changelog +### Breaking Changes + - "60/2 VW" trigger wheel renamed to "60-2 Wrong Polarity" #988 + + ## Unreleased ## April 2024 "Day 785" diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index e9ab37a166..82a8dde866 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -102,8 +102,7 @@ void m73engine() { engineConfiguration->globalTriggerAngleOffset = 90; setCrankOperationMode(); - // todo: that's not right, should be 60/2 without VW - engineConfiguration->trigger.type = trigger_type_e::TT_60_2_VW; + engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_60_2; // this large engine seems to crank at around only 150 RPM? And happily idle at 400RPM? engineConfiguration->cranking.rpm = 350; diff --git a/firmware/config/engines/bmw_m73_mre.cpp b/firmware/config/engines/bmw_m73_mre.cpp index 86e5d72bd5..f460c461e1 100644 --- a/firmware/config/engines/bmw_m73_mre.cpp +++ b/firmware/config/engines/bmw_m73_mre.cpp @@ -98,9 +98,7 @@ void setEngineBMW_M73_microRusEfi() { engineConfiguration->enableVerboseCanTx = true; - - // do I have VR wires flipped? - engineConfiguration->trigger.type = trigger_type_e::TT_60_2_VW; + engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_60_2; //set tps_min 891 engineConfiguration->tpsMin = 891; diff --git a/firmware/controllers/algo/engine_types.h b/firmware/controllers/algo/engine_types.h index 5be2427415..c431219969 100644 --- a/firmware/controllers/algo/engine_types.h +++ b/firmware/controllers/algo/engine_types.h @@ -319,8 +319,8 @@ enum class trigger_type_e : uint32_t { TT_HALF_MOON = 18, TT_DODGE_RAM = 19, - // * It looks like this is the VR shape if you have your wires flipped - TT_60_2_VW = 20, + // keeping for compatibility with M73 PnP harnesses which until 2023 were build with VR wires flipped + TT_60_2_WRONG_POLARITY = 20, TT_BENELLI_TRE = 21, TT_DODGE_STRATUS = 22, // Subaru but also Mazda RX-8, we suspect that it's VR diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 9f31955f73..6ee930ea02 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -616,7 +616,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio setTriggerSynchronizationGap3(/*gapIndex*/1, /*from*/0.7, 1.3); // second gap is not required to synch on perfect signal but is needed to handle to reject cranking transition noise break; - case trigger_type_e::TT_60_2_VW: + case trigger_type_e::TT_60_2_WRONG_POLARITY: setVwConfiguration(this); break; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index e160e8be27..06697a38b6 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -605,7 +605,7 @@ adc_channel_e fuelLevelSensor;This is the processor pin that your fuel level sen struct trigger_config_s ! 'INVALID' for TT_VVT_* wheels -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Daihatsu 3 cylinder", "Mazda SOHC 4", "60-2", "36-1", "Mercedes Two Segment", "Single Tooth", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Half Moon", "Dodge Ram 1+16", "60-2 VW", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600 Cam", "Mitsubishi 4G92/93/94 Cam 29", "Honda CBR 600 custom", "3-1 skipped", "Dodge Neon 2003 crank", "Miata NB", "Mitsubishi 4G63 Cam 34", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12crank/24cam", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36-2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "INVALID", "GM 60-2-2-2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "INVALID", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32-2", "36-2-1", "36-2-1-1", "3-0", "INVALID", "GM 24x 3 degree", "60-2-2 F3R", "Mitsu 4G63 Crank", "x2 30 Deg camshaft BTDC", "INVALID", "Mitsu 6G72 Cam", "6-0", "Daihatsu 4 cylinder", "trg82", "trg83" +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Daihatsu 3 cylinder", "Mazda SOHC 4", "60-2", "36-1", "Mercedes Two Segment", "Single Tooth", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Half Moon", "Dodge Ram 1+16", "60-2 Wrong Polarity", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600 Cam", "Mitsubishi 4G92/93/94 Cam 29", "Honda CBR 600 custom", "3-1 skipped", "Dodge Neon 2003 crank", "Miata NB", "Mitsubishi 4G63 Cam 34", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12crank/24cam", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36-2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "INVALID", "GM 60-2-2-2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "INVALID", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32-2", "36-2-1", "36-2-1-1", "3-0", "INVALID", "GM 24x 3 degree", "60-2-2 F3R", "Mitsu 4G63 Crank", "x2 30 Deg camshaft BTDC", "INVALID", "Mitsu 6G72 Cam", "6-0", "Daihatsu 4 cylinder", "trg82", "trg83" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:6], @@trigger_type_e_enum@@ trigger_type_e type;https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers diff --git a/unit_tests/tests/trigger/test_real_volkswagen.cpp b/unit_tests/tests/trigger/test_real_volkswagen.cpp index ce752da4e3..433192df27 100644 --- a/unit_tests/tests/trigger/test_real_volkswagen.cpp +++ b/unit_tests/tests/trigger/test_real_volkswagen.cpp @@ -15,7 +15,7 @@ TEST(crankingVW, vwRealCrankingFromFile) { reader.open("tests/trigger/resources/nick_1.csv"); EngineTestHelper eth (engine_type_e::VW_ABA); engineConfiguration->alwaysInstantRpm = true; - eth.setTriggerType(trigger_type_e::TT_60_2_VW); + eth.setTriggerType(trigger_type_e::TT_60_2_WRONG_POLARITY); while (reader.haveMore()) { reader.processLine(ð); @@ -28,13 +28,13 @@ TEST(crankingVW, vwRealCrankingFromFile) { TEST(crankingVW, crankingTwiceWithGap) { EngineTestHelper eth (engine_type_e::VW_ABA); engineConfiguration->alwaysInstantRpm = true; - eth.setTriggerType(trigger_type_e::TT_60_2_VW); + eth.setTriggerType(trigger_type_e::TT_60_2_WRONG_POLARITY); { CsvReader reader(1, /* vvtCount */ 0); reader.open("tests/trigger/resources/nick_1.csv"); - + while (reader.haveMore()) { reader.processLine(ð); } @@ -50,7 +50,7 @@ TEST(crankingVW, crankingTwiceWithGap) { CsvReader reader(1, /* vvtCount */ 0, 10); reader.open("tests/trigger/resources/nick_1.csv"); - + while (reader.haveMore()) { reader.processLine(ð); } @@ -64,7 +64,7 @@ TEST(crankingVW, crankingTwiceWithGap) { CsvReader reader(1, /* vvtCount */ 0, 314.159); reader.open("tests/trigger/resources/nick_1.csv"); - + while (reader.haveMore()) { reader.processLine(ð); }