diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index ec4fc93a73..e6b8c4738c 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -1964,6 +1964,8 @@ #define trigger_todoRemoveMeOneDay0_offset_hex 210 #define trigger_todoRemoveMeOneDay1_offset 528 #define trigger_todoRemoveMeOneDay1_offset_hex 210 +#define TRIGGER_TYPE_36_1 9 +#define TRIGGER_TYPE_60_2 8 #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", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "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", "trg44", "trg45", "INVALID" #define trigger_type_offset 524 #define trigger_type_offset_hex 20c diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index f933cd49c7..affc184d97 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -1964,6 +1964,8 @@ #define trigger_todoRemoveMeOneDay0_offset_hex 210 #define trigger_todoRemoveMeOneDay1_offset 528 #define trigger_todoRemoveMeOneDay1_offset_hex 210 +#define TRIGGER_TYPE_36_1 9 +#define TRIGGER_TYPE_60_2 8 #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", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "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", "trg44", "trg45", "INVALID" #define trigger_type_offset 524 #define trigger_type_offset_hex 20c diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 696bcb5209..c4f84f3d74 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -42,6 +42,11 @@ WaveChart waveChart; trigger_central_s::trigger_central_s() : hwEventCounters() { + static_assert(TRIGGER_TYPE_60_2 == TT_TOOTHED_WHEEL_60_2, "One we will have one source of this magic constant"); + static_assert(TRIGGER_TYPE_36_1 == TT_TOOTHED_WHEEL_36_1, "One we will have one source of this magic constant"); + + + } TriggerCentral::TriggerCentral() : trigger_central_s() { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 39d73a5fb6..ed04cf5fe8 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -73,6 +73,9 @@ struct_no_prefix engine_configuration_s #define ETB_BIAS_CURVE_LENGTH 8 +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + #define MAP_ANGLE_SIZE 8 #define MAP_WINDOW_SIZE 8 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index a081e0634d..7f786f37ca 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1569,7 +1569,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError - field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == 9} dialog = triggerConfiguration panel = triggerConfiguration_settings, North panel = triggerConfiguration_IO, South diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index 0d6b10dad2..b36d4db53f 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Apr 10 17:27:25 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Apr 11 01:15:22 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -1292,6 +1292,8 @@ public class Fields { public static final int trigger_todoRemoveMeOneDay0_offset_hex = 210; public static final int trigger_todoRemoveMeOneDay1_offset = 528; public static final int trigger_todoRemoveMeOneDay1_offset_hex = 210; + public static final int TRIGGER_TYPE_36_1 = 9; + public static final int TRIGGER_TYPE_60_2 = 8; public static final int trigger_type_offset = 524; public static final int trigger_unusedBit_4_10_offset = 528; public static final int trigger_unusedBit_4_10_offset_hex = 210;