From 61cfff1e9e3b8f7dd656e4f36528f3f61b647658 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 24 Sep 2022 23:25:36 -0400 Subject: [PATCH] K progress - just a rename --- .../cypress/config/controllers/algo/rusefi_generated.h | 4 ++-- .../kinetis/config/controllers/algo/rusefi_generated.h | 4 ++-- .../subaru_eg33/config/controllers/algo/rusefi_generated.h | 4 ++-- firmware/config/engines/honda_k_dbc.cpp | 2 +- firmware/controllers/algo/auto_generated_commonenum.cpp | 4 ++-- firmware/controllers/algo/engine.cpp | 2 +- firmware/controllers/algo/rusefi_enums.h | 2 +- firmware/controllers/generated/rusefi_generated.h | 4 ++-- firmware/controllers/trigger/trigger_central.cpp | 6 +++--- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/firmware/config/boards/cypress/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/cypress/config/controllers/algo/rusefi_generated.h index ac06d00b12..7207b51f33 100644 --- a/firmware/config/boards/cypress/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/cypress/config/controllers/algo/rusefi_generated.h @@ -2667,14 +2667,14 @@ #define vssFilterReciprocal_offset 567 #define vssGearRatio_offset 568 #define vssToothCount_offset 570 -#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" +#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K_INTAKE",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" #define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2JZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K 4+1", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "vvt16", "vvt17" #define vvt_mode_e_VVT_2JZ 2 #define vvt_mode_e_VVT_BARRA_3_PLUS_1 8 #define vvt_mode_e_VVT_BOSCH_QUICK_START 5 #define vvt_mode_e_VVT_FIRST_HALF 4 #define vvt_mode_e_VVT_FORD_ST170 7 -#define vvt_mode_e_VVT_HONDA_K 10 +#define vvt_mode_e_VVT_HONDA_K_INTAKE 10 #define vvt_mode_e_VVT_INACTIVE 0 #define vvt_mode_e_VVT_MAP_V_TWIN 13 #define vvt_mode_e_VVT_MAZDA_SKYACTIV 15 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 74005ee8a8..a01fe059d0 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -2667,14 +2667,14 @@ #define vssFilterReciprocal_offset 567 #define vssGearRatio_offset 568 #define vssToothCount_offset 570 -#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" +#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K_INTAKE",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" #define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2JZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K 4+1", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "vvt16", "vvt17" #define vvt_mode_e_VVT_2JZ 2 #define vvt_mode_e_VVT_BARRA_3_PLUS_1 8 #define vvt_mode_e_VVT_BOSCH_QUICK_START 5 #define vvt_mode_e_VVT_FIRST_HALF 4 #define vvt_mode_e_VVT_FORD_ST170 7 -#define vvt_mode_e_VVT_HONDA_K 10 +#define vvt_mode_e_VVT_HONDA_K_INTAKE 10 #define vvt_mode_e_VVT_INACTIVE 0 #define vvt_mode_e_VVT_MAP_V_TWIN 13 #define vvt_mode_e_VVT_MAZDA_SKYACTIV 15 diff --git a/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h index c987271eeb..30df24efaf 100644 --- a/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h @@ -2634,14 +2634,14 @@ #define vssFilterReciprocal_offset 567 #define vssGearRatio_offset 568 #define vssToothCount_offset 570 -#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" +#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K_INTAKE",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" #define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2JZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K 4+1", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "vvt16", "vvt17" #define vvt_mode_e_VVT_2JZ 2 #define vvt_mode_e_VVT_BARRA_3_PLUS_1 8 #define vvt_mode_e_VVT_BOSCH_QUICK_START 5 #define vvt_mode_e_VVT_FIRST_HALF 4 #define vvt_mode_e_VVT_FORD_ST170 7 -#define vvt_mode_e_VVT_HONDA_K 10 +#define vvt_mode_e_VVT_HONDA_K_INTAKE 10 #define vvt_mode_e_VVT_INACTIVE 0 #define vvt_mode_e_VVT_MAP_V_TWIN 13 #define vvt_mode_e_VVT_MAZDA_SKYACTIV 15 diff --git a/firmware/config/engines/honda_k_dbc.cpp b/firmware/config/engines/honda_k_dbc.cpp index f3352f1a1e..96f4d52f38 100644 --- a/firmware/config/engines/honda_k_dbc.cpp +++ b/firmware/config/engines/honda_k_dbc.cpp @@ -29,7 +29,7 @@ void setProteusHondaElement2003() { // engineConfiguration->trigger.type = TT_HONDA_K_CAM_4_1; // cam as primary, ignoring crank // engineConfiguration->globalTriggerAngleOffset = 570; - engineConfiguration->vvtMode[0] = VVT_HONDA_K; + engineConfiguration->vvtMode[0] = VVT_HONDA_K_INTAKE; engineConfiguration->vvtMode[1] = VVT_FIRST_HALF; engineConfiguration->vvtOffsets[0] = -41; diff --git a/firmware/controllers/algo/auto_generated_commonenum.cpp b/firmware/controllers/algo/auto_generated_commonenum.cpp index c843d0d1ae..c5b4e37f5e 100644 --- a/firmware/controllers/algo/auto_generated_commonenum.cpp +++ b/firmware/controllers/algo/auto_generated_commonenum.cpp @@ -723,8 +723,8 @@ case VVT_FIRST_HALF: return "VVT_FIRST_HALF"; case VVT_FORD_ST170: return "VVT_FORD_ST170"; -case VVT_HONDA_K: - return "VVT_HONDA_K"; +case VVT_HONDA_K_INTAKE: + return "VVT_HONDA_K_INTAKE"; case VVT_INACTIVE: return "VVT_INACTIVE"; case VVT_MAP_V_TWIN: diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 6ec853454a..330181eac0 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -74,7 +74,7 @@ trigger_type_e getVvtTriggerType(vvt_mode_e vvtMode) { return TT_VVT_MIATA_NB; case VVT_BOSCH_QUICK_START: return TT_VVT_BOSCH_QUICK_START; - case VVT_HONDA_K: + case VVT_HONDA_K_INTAKE: case VVT_FIRST_HALF: case VVT_SECOND_HALF: case VVT_MAP_V_TWIN: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index bd1d9e4edb..dfd55cdeb6 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -90,7 +90,7 @@ typedef enum __attribute__ ((__packed__)) { /** * 4 plus one */ - VVT_HONDA_K = 10, + VVT_HONDA_K_INTAKE = 10, VVT_NISSAN_MR = 11, diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index bf6d6eced3..12ae4c8556 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -2667,14 +2667,14 @@ #define vssFilterReciprocal_offset 567 #define vssGearRatio_offset 568 #define vssToothCount_offset 570 -#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" +#define vvt_mode_e_auto_enum 0="VVT_INACTIVE",2="VVT_2JZ",8="VVT_BARRA_3_PLUS_1",5="VVT_BOSCH_QUICK_START",4="VVT_FIRST_HALF",7="VVT_FORD_ST170",10="VVT_HONDA_K_INTAKE",13="VVT_MAP_V_TWIN",15="VVT_MAZDA_SKYACTIV",3="VVT_MIATA_NB",12="VVT_MITSUBISHI_3A92",14="VVT_MITSUBISHI_6G75",11="VVT_NISSAN_MR",9="VVT_NISSAN_VQ",1="VVT_SECOND_HALF",6="VVT_TOYOTA_4_1" #define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2JZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K 4+1", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "vvt16", "vvt17" #define vvt_mode_e_VVT_2JZ 2 #define vvt_mode_e_VVT_BARRA_3_PLUS_1 8 #define vvt_mode_e_VVT_BOSCH_QUICK_START 5 #define vvt_mode_e_VVT_FIRST_HALF 4 #define vvt_mode_e_VVT_FORD_ST170 7 -#define vvt_mode_e_VVT_HONDA_K 10 +#define vvt_mode_e_VVT_HONDA_K_INTAKE 10 #define vvt_mode_e_VVT_INACTIVE 0 #define vvt_mode_e_VVT_MAP_V_TWIN 13 #define vvt_mode_e_VVT_MAZDA_SKYACTIV 15 diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 266c365dda..9a27b35eb1 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -118,7 +118,7 @@ static bool vvtWithRealDecoder(vvt_mode_e vvtMode) { // todo: why does VVT_2JZ not use real decoder? return vvtMode != VVT_INACTIVE && vvtMode != VVT_2JZ - && vvtMode != VVT_HONDA_K + && vvtMode != VVT_HONDA_K_INTAKE && vvtMode != VVT_MAP_V_TWIN && vvtMode != VVT_SECOND_HALF && vvtMode != VVT_FIRST_HALF; @@ -180,7 +180,7 @@ static angle_t adjustCrankPhase(int camIndex) { case VVT_MAZDA_SKYACTIV: case VVT_MITSUBISHI_3A92: case VVT_MITSUBISHI_6G75: - case VVT_HONDA_K: + case VVT_HONDA_K_INTAKE: return syncAndReport(tc, getCrankDivider(operationMode), engineConfiguration->vvtBooleanForVerySpecialCases ? 1 : 0); case VVT_INACTIVE: // do nothing @@ -360,7 +360,7 @@ void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) { // this could be just an 'if' but let's have it expandable for future use :) switch(engineConfiguration->vvtMode[camIndex]) { - case VVT_HONDA_K: + case VVT_HONDA_K_INTAKE: // honda K has four tooth in VVT intake trigger, so we just wrap each of those to 720 / 4 vvtPosition = wrapVvt(vvtPosition, 180); break;