diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index b1a0cdd196..7cff7944aa 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -95,13 +95,17 @@ void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { } +/** + * TOYOTA_2JZ_GTE_VVTi + * set engine_type 44 + */ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { common2jz(PASS_CONFIG_PARAMETER_SIGNATURE); engineConfiguration->isSdCardEnabled = true; setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); - engineConfiguration->trigger.type = TT_2JZ_3_34; + engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_2; engineConfiguration->triggerInputPins[0] = GPIOA_5; // crank sensor engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; // cam sensor will he handled by custom vtti code diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index eb2ada7262..7f9ffb07a1 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -1193,6 +1193,8 @@ case TT_TOOTHED_WHEEL: return "TT_TOOTHED_WHEEL"; case TT_TOOTHED_WHEEL_36_1: return "TT_TOOTHED_WHEEL_36_1"; +case TT_TOOTHED_WHEEL_36_2: + return "TT_TOOTHED_WHEEL_36_2"; case TT_TOOTHED_WHEEL_60_2: return "TT_TOOTHED_WHEEL_60_2"; case TT_UNUSED: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 81e459e65c..f0655084a3 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -341,13 +341,15 @@ typedef enum { TT_BOSCH_QUICK_START = 47, + TT_TOOTHED_WHEEL_36_2 = 48, + // do not forget to edit "#define trigger_type_e_enum" line in integration/rusefi_config.txt file to propogate new value to rusefi.ini TS project // do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt // todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic // // Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests // - TT_UNUSED = 48, // this is used if we want to iterate over all trigger types + TT_UNUSED = 49, // this is used if we want to iterate over all trigger types Force_4_bytes_size_trigger_type = ENUM_32_BITS, } trigger_type_e; diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index f0d3b1537f..1ced3b7348 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -546,6 +546,10 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ setToothedWheelConfiguration(this, 60, 2, ambiguousOperationMode); break; + case TT_TOOTHED_WHEEL_36_2: + setToothedWheelConfiguration(this, 36, 2, ambiguousOperationMode); + break; + case TT_60_2_VW: setVwConfiguration(this); break; diff --git a/firmware/controllers/trigger/decoders/trigger_toyota.h b/firmware/controllers/trigger/decoders/trigger_toyota.h index 5c62dc4022..7488b2a7a8 100644 --- a/firmware/controllers/trigger/decoders/trigger_toyota.h +++ b/firmware/controllers/trigger/decoders/trigger_toyota.h @@ -10,5 +10,6 @@ #include "trigger_structure.h" void initialize2jzGE1_12(TriggerWaveform *s); +// TT_2JZ_3_34 void initialize2jzGE3_34_simulation_shape(TriggerWaveform *s); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 2d1f295a78..84d93a5a24 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -524,7 +524,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", "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", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "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", "1+60/2", "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", "trg49", "trg50", "INVALID" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:7], @@trigger_type_e_enum@@ trigger_type_e type;set trigger_type X