From 9571f1fe67203004666a17963d79ba5e622b614a Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 19 Mar 2022 15:52:42 -0400 Subject: [PATCH] Mitsubishi 4B11 support #4013 --- firmware/controllers/algo/auto_generated_enginetypes.cpp | 1 + firmware/controllers/algo/engine_types.h | 6 +++++- firmware/controllers/trigger/decoders/trigger_structure.cpp | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/algo/auto_generated_enginetypes.cpp b/firmware/controllers/algo/auto_generated_enginetypes.cpp index 25404d2062..27678df906 100644 --- a/firmware/controllers/algo/auto_generated_enginetypes.cpp +++ b/firmware/controllers/algo/auto_generated_enginetypes.cpp @@ -488,6 +488,7 @@ case TT_SUZUKI_G13B: return "TT_SUZUKI_G13B"; case TT_TOOTHED_WHEEL: return "TT_TOOTHED_WHEEL"; +case TT_36_2_1: case TT_TOOTHED_WHEEL_32_2: return "TT_TOOTHED_WHEEL_32_2"; case TT_TOOTHED_WHEEL_36_1: diff --git a/firmware/controllers/algo/engine_types.h b/firmware/controllers/algo/engine_types.h index 24e029c921..4b2cddfa7d 100644 --- a/firmware/controllers/algo/engine_types.h +++ b/firmware/controllers/algo/engine_types.h @@ -507,6 +507,10 @@ typedef enum { TT_TOOTHED_WHEEL_32_2 = 69, + // Mitsubishi 4B11 would be this with half moon camshaft + TT_36_2_1 = 70, + + // 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 @@ -514,7 +518,7 @@ typedef enum { // // Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests // - TT_UNUSED = 70, // this is used if we want to iterate over all trigger types + TT_UNUSED = 71, // this is used if we want to iterate over all trigger types // todo: convert to ENUM_16_BITS? I can see 257 triggers but not 65K triggers Force_4_bytes_size_trigger_type = ENUM_32_BITS, diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 1d7a57e438..73c1d218dc 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -598,6 +598,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e ambiguousOperat setToothedWheelConfiguration(this, 3, 0, ambiguousOperationMode); break; + case TT_36_2_1: case TT_TOOTHED_WHEEL_32_2: setToothedWheelConfiguration(this, 32, 2, ambiguousOperationMode); // todo: add this second/third into 'setToothedWheelConfiguration' as long as we have enough tooth?