diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index ccaa8a5b4b..1bc90b5b09 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -30,6 +30,7 @@ All notable user-facing or behavior-altering changes will be documented in this ### Added - GM 60/2/2/2 trigger https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers#gm - TriTach trigger https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers#tritach + - Skoda Favorit trigger https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers#skoda-favorit ### 2021 Printing Ink Day diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 38dd993bbb..38e6cb0d8d 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -541,6 +541,9 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ break; case TT_SKODA_FAVORIT: + setSkodaFavorit(this); + break; + case TT_GM_60_2_2_2: configureGm60_2_2_2(this); break; diff --git a/firmware/controllers/trigger/decoders/trigger_vw.cpp b/firmware/controllers/trigger/decoders/trigger_vw.cpp index 525fbaee3e..5ea035499e 100644 --- a/firmware/controllers/trigger/decoders/trigger_vw.cpp +++ b/firmware/controllers/trigger/decoders/trigger_vw.cpp @@ -23,6 +23,8 @@ void setSkodaFavorit(TriggerWaveform *s) { s->addEvent720(m * 226, T_PRIMARY, TV_RISE); s->addEvent720(m * 360, T_PRIMARY, TV_FALL); + s->tdcPosition = 180 - 46; + s->setTriggerSynchronizationGap(3.91); } void setVwConfiguration(TriggerWaveform *s) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index d84533b7f5..b49c820f3e 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -648,7 +648,7 @@ struct trigger_config_s @brief Trigger wheel(s) configuration custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "trg52", "TriTach", "GM 60/2/2?2", "trg55", "trg56", "trg57", "INVALID" +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "trg52", "TriTach", "GM 60/2/2?2", "Skoda Favorit", "trg56", "trg57", "INVALID" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@ trigger_type_e type;set trigger_type X diff --git a/java_console/ui/src/main/java/com/rusefi/TriggerImage.java b/java_console/ui/src/main/java/com/rusefi/TriggerImage.java index d4c72ef928..63a3a1e236 100644 --- a/java_console/ui/src/main/java/com/rusefi/TriggerImage.java +++ b/java_console/ui/src/main/java/com/rusefi/TriggerImage.java @@ -67,6 +67,8 @@ public class TriggerImage { return "Subaru 7/6"; case Fields.TT_TT_GM_LS_24: return "GM 24x"; + case Fields.TT_TT_SKODA_FAVORIT: + return "Skoda Favorit"; case Fields.TT_TT_GM_7X: return "GM 7x"; case Fields.TT_TT_CHRYSLER_NGC_36_2_2: diff --git a/java_console/ui/src/main/java/com/rusefi/TriggerWheelInfo.java b/java_console/ui/src/main/java/com/rusefi/TriggerWheelInfo.java index 692b18ca77..771d726d75 100644 --- a/java_console/ui/src/main/java/com/rusefi/TriggerWheelInfo.java +++ b/java_console/ui/src/main/java/com/rusefi/TriggerWheelInfo.java @@ -101,6 +101,7 @@ class TriggerWheelInfo { id == Fields.TT_TT_RENIX_66_2_2_2 || id == Fields.TT_TT_MIATA_VVT || id == Fields.TT_TT_TRI_TACH || + id == Fields.TT_TT_SKODA_FAVORIT || id == Fields.TT_TT_GM_7X; } diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index 45232b38e1..c7a2c15325 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -36,7 +36,10 @@ bool verboseMode = false; GTEST_API_ int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); // uncomment if you only want to run selected tests - //::testing::GTEST_FLAG(filter) = "*testFasterEngineSpinningUp*"; + /** + * See TEST_FROM_TRIGGER_ID to limit test just for last trigger + */ + //::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*"; int result = RUN_ALL_TESTS(); // windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure return result == 0 ? 0 : -1; diff --git a/unit_tests/tests/test_all_triggers.cpp b/unit_tests/tests/test_all_triggers.cpp index 565fb05be4..a19d1fc644 100644 --- a/unit_tests/tests/test_all_triggers.cpp +++ b/unit_tests/tests/test_all_triggers.cpp @@ -1,7 +1,13 @@ +/** + * @file test_all_triggers.cpp + */ #include "engine.h" #include +// uncomment to test only newest trigger +//#define TEST_FROM_TRIGGER_ID ((int)TT_UNUSED - 1) +#define TEST_FROM_TRIGGER_ID 1 struct TriggerExportHelper { @@ -31,7 +37,7 @@ INSTANTIATE_TEST_SUITE_P( AllTriggersFixture, // Test all triggers from the first valid trigger thru the last // (Skip index 0, that's custom toothed wheel which is covered by others) - ::testing::Range((trigger_type_e)1, TT_UNUSED) + ::testing::Range((trigger_type_e)TEST_FROM_TRIGGER_ID, TT_UNUSED) ); extern bool printTriggerDebug;