From 50e25605b8fbe63e1cac6dff7b744650c7fa321d Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 1 Jul 2021 17:28:52 -0400 Subject: [PATCH] Nissan VVT trigger decoder #2887 --- .../cypress/config/controllers/algo/auto_generated_enums.cpp | 4 +++- .../kinetis/config/controllers/algo/auto_generated_enums.cpp | 4 +++- .../config/controllers/algo/auto_generated_enums.cpp | 4 +++- firmware/controllers/algo/auto_generated_enums.cpp | 4 +++- firmware/controllers/algo/rusefi_enums.h | 2 ++ firmware/controllers/trigger/decoders/trigger_structure.cpp | 1 + firmware/integration/rusefi_config.txt | 1 + 7 files changed, 16 insertions(+), 4 deletions(-) diff --git a/firmware/config/boards/hellen/cypress/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/hellen/cypress/config/controllers/algo/auto_generated_enums.cpp index 7ae6267fcc..cd6fdf1add 100644 --- a/firmware/config/boards/hellen/cypress/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/hellen/cypress/config/controllers/algo/auto_generated_enums.cpp @@ -1,7 +1,7 @@ #include "global.h" #include "rusefi_enums.h" #include "rusefi_hw_enums.h" -// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 16:59:55 EDT 2021 +// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 17:26:03 EDT 2021 // see also gen_config_and_enums.bat @@ -1438,6 +1438,8 @@ case TT_NISSAN_SR20VE: return "TT_NISSAN_SR20VE"; case TT_NISSAN_SR20VE_360: return "TT_NISSAN_SR20VE_360"; +case TT_NISSAN_VQ: + return "TT_NISSAN_VQ"; case TT_ONE: return "TT_ONE"; case TT_ONE_PLUS_ONE: diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 0aaef5ee8f..0c66e48d0f 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -1,7 +1,7 @@ #include "global.h" #include "rusefi_enums.h" #include "rusefi_hw_enums.h" -// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 16:59:55 EDT 2021 +// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 17:26:02 EDT 2021 // see also gen_config_and_enums.bat @@ -1234,6 +1234,8 @@ case TT_NISSAN_SR20VE: return "TT_NISSAN_SR20VE"; case TT_NISSAN_SR20VE_360: return "TT_NISSAN_SR20VE_360"; +case TT_NISSAN_VQ: + return "TT_NISSAN_VQ"; case TT_ONE: return "TT_ONE"; case TT_ONE_PLUS_ONE: diff --git a/firmware/config/boards/subaru_eg33/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/subaru_eg33/config/controllers/algo/auto_generated_enums.cpp index ad692fb897..885bf7cf67 100644 --- a/firmware/config/boards/subaru_eg33/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/subaru_eg33/config/controllers/algo/auto_generated_enums.cpp @@ -1,7 +1,7 @@ #include "global.h" #include "rusefi_enums.h" #include "rusefi_hw_enums.h" -// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 16:59:56 EDT 2021 +// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 17:26:03 EDT 2021 // see also gen_config_and_enums.bat @@ -1434,6 +1434,8 @@ case TT_NISSAN_SR20VE: return "TT_NISSAN_SR20VE"; case TT_NISSAN_SR20VE_360: return "TT_NISSAN_SR20VE_360"; +case TT_NISSAN_VQ: + return "TT_NISSAN_VQ"; case TT_ONE: return "TT_ONE"; case TT_ONE_PLUS_ONE: diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 08ac8756c9..0ce5929ab7 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -1,7 +1,7 @@ #include "global.h" #include "rusefi_enums.h" #include "rusefi_hw_enums.h" -// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 16:59:55 EDT 2021 +// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 17:26:01 EDT 2021 // see also gen_config_and_enums.bat @@ -1410,6 +1410,8 @@ case TT_NISSAN_SR20VE: return "TT_NISSAN_SR20VE"; case TT_NISSAN_SR20VE_360: return "TT_NISSAN_SR20VE_360"; +case TT_NISSAN_VQ: + return "TT_NISSAN_VQ"; case TT_ONE: return "TT_ONE"; case TT_ONE_PLUS_ONE: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 76edbbf081..3f8ae9db12 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -394,6 +394,8 @@ typedef enum { TT_KAWA_KX450F = TT_TT_KAWA_KX450F, + TT_NISSAN_VQ = TT_TT_NISSAN_VQ, + // 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 diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 603d73b7ed..841febb9af 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -545,6 +545,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e ambiguousOperat configureFordAspireTriggerWaveform(this); break; + case TT_TT_NISSAN_VQ: case TT_KAWA_KX450F: configureKawaKX450F(this); break; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index fb5548717e..58f9df0ecf 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -448,6 +448,7 @@ end_struct #define TT_TT_VVT_BARRA_3_PLUS_1 56 #define TT_TT_KAWA_KX450F 57 #define TT_TT_NISSAN_VQ 58 +#define TT_TT_VVT_NISSAN_VQ 59 ! todo https://github.com/rusefi/rusefi/issues/2102