refactoring: enum name clean-up
This commit is contained in:
parent
4f6f985d4f
commit
da66fa055c
|
@ -2640,7 +2640,7 @@
|
|||
#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_ANOTHER",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",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
|
||||
|
@ -2649,7 +2649,7 @@
|
|||
#define vvt_mode_e_VVT_FORD_ST170 7
|
||||
#define vvt_mode_e_VVT_HONDA_K 10
|
||||
#define vvt_mode_e_VVT_INACTIVE 0
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN_ANOTHER 13
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN 13
|
||||
#define vvt_mode_e_VVT_MAZDA_SKYACTIV 15
|
||||
#define vvt_mode_e_VVT_MIATA_NB 3
|
||||
#define vvt_mode_e_VVT_MITSUBISHI_3A92 12
|
||||
|
|
|
@ -2640,7 +2640,7 @@
|
|||
#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_ANOTHER",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",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
|
||||
|
@ -2649,7 +2649,7 @@
|
|||
#define vvt_mode_e_VVT_FORD_ST170 7
|
||||
#define vvt_mode_e_VVT_HONDA_K 10
|
||||
#define vvt_mode_e_VVT_INACTIVE 0
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN_ANOTHER 13
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN 13
|
||||
#define vvt_mode_e_VVT_MAZDA_SKYACTIV 15
|
||||
#define vvt_mode_e_VVT_MIATA_NB 3
|
||||
#define vvt_mode_e_VVT_MITSUBISHI_3A92 12
|
||||
|
|
|
@ -2607,7 +2607,7 @@
|
|||
#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_ANOTHER",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",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
|
||||
|
@ -2616,7 +2616,7 @@
|
|||
#define vvt_mode_e_VVT_FORD_ST170 7
|
||||
#define vvt_mode_e_VVT_HONDA_K 10
|
||||
#define vvt_mode_e_VVT_INACTIVE 0
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN_ANOTHER 13
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN 13
|
||||
#define vvt_mode_e_VVT_MAZDA_SKYACTIV 15
|
||||
#define vvt_mode_e_VVT_MIATA_NB 3
|
||||
#define vvt_mode_e_VVT_MITSUBISHI_3A92 12
|
||||
|
|
|
@ -12,7 +12,7 @@ void proteusHarley() {
|
|||
|
||||
// for now we need non wired camInput to keep TS field enable/disable logic happy
|
||||
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_6;
|
||||
engineConfiguration->vvtMode[0] = VVT_MAP_V_TWIN_ANOTHER;
|
||||
engineConfiguration->vvtMode[0] = VVT_MAP_V_TWIN;
|
||||
|
||||
engineConfiguration->luaOutputPins[0] = PROTEUS_LS_12;
|
||||
#if HW_PROTEUS
|
||||
|
|
|
@ -740,8 +740,8 @@ case VVT_HONDA_K:
|
|||
return "VVT_HONDA_K";
|
||||
case VVT_INACTIVE:
|
||||
return "VVT_INACTIVE";
|
||||
case VVT_MAP_V_TWIN_ANOTHER:
|
||||
return "VVT_MAP_V_TWIN_ANOTHER";
|
||||
case VVT_MAP_V_TWIN:
|
||||
return "VVT_MAP_V_TWIN";
|
||||
case VVT_MAZDA_SKYACTIV:
|
||||
return "VVT_MAZDA_SKYACTIV";
|
||||
case VVT_MIATA_NB:
|
||||
|
|
|
@ -77,7 +77,7 @@ trigger_type_e getVvtTriggerType(vvt_mode_e vvtMode) {
|
|||
case VVT_HONDA_K:
|
||||
case VVT_FIRST_HALF:
|
||||
case VVT_SECOND_HALF:
|
||||
case VVT_MAP_V_TWIN_ANOTHER:
|
||||
case VVT_MAP_V_TWIN:
|
||||
return TT_ONE;
|
||||
case VVT_FORD_ST170:
|
||||
return TT_FORD_ST170;
|
||||
|
|
|
@ -114,7 +114,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
|
||||
VVT_MITSUBISHI_3A92 = 12,
|
||||
|
||||
VVT_MAP_V_TWIN_ANOTHER = 13,
|
||||
VVT_MAP_V_TWIN = 13,
|
||||
|
||||
VVT_MITSUBISHI_6G75 = 14,
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ bool noFiringUntilVvtSync(vvt_mode_e vvtMode) {
|
|||
auto operationMode = engine->getOperationMode();
|
||||
|
||||
// V-Twin MAP phase sense needs to always wait for sync
|
||||
if (vvtMode == VVT_MAP_V_TWIN_ANOTHER) {
|
||||
if (vvtMode == VVT_MAP_V_TWIN) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2640,7 +2640,7 @@
|
|||
#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_ANOTHER",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",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
|
||||
|
@ -2649,7 +2649,7 @@
|
|||
#define vvt_mode_e_VVT_FORD_ST170 7
|
||||
#define vvt_mode_e_VVT_HONDA_K 10
|
||||
#define vvt_mode_e_VVT_INACTIVE 0
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN_ANOTHER 13
|
||||
#define vvt_mode_e_VVT_MAP_V_TWIN 13
|
||||
#define vvt_mode_e_VVT_MAZDA_SKYACTIV 15
|
||||
#define vvt_mode_e_VVT_MIATA_NB 3
|
||||
#define vvt_mode_e_VVT_MITSUBISHI_3A92 12
|
||||
|
|
|
@ -119,7 +119,7 @@ static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
|||
return vvtMode != VVT_INACTIVE
|
||||
&& vvtMode != VVT_2JZ
|
||||
&& vvtMode != VVT_HONDA_K
|
||||
&& vvtMode != VVT_MAP_V_TWIN_ANOTHER
|
||||
&& vvtMode != VVT_MAP_V_TWIN
|
||||
&& vvtMode != VVT_SECOND_HALF
|
||||
&& vvtMode != VVT_FIRST_HALF;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ static angle_t adjustCrankPhase(int camIndex) {
|
|||
vvt_mode_e vvtMode = engineConfiguration->vvtMode[camIndex];
|
||||
switch (vvtMode) {
|
||||
case VVT_FIRST_HALF:
|
||||
case VVT_MAP_V_TWIN_ANOTHER:
|
||||
case VVT_MAP_V_TWIN:
|
||||
return syncAndReport(tc, getCrankDivider(operationMode), 1);
|
||||
case VVT_SECOND_HALF:
|
||||
case VVT_NISSAN_VQ:
|
||||
|
@ -604,7 +604,7 @@ bool TriggerNoiseFilter::noiseFilter(efitick_t nowNt,
|
|||
|
||||
void TriggerCentral::decodeMapCam(efitick_t timestamp, float currentPhase) {
|
||||
#if WITH_TS_STATE
|
||||
if (engineConfiguration->vvtMode[0] == VVT_MAP_V_TWIN_ANOTHER &&
|
||||
if (engineConfiguration->vvtMode[0] == VVT_MAP_V_TWIN &&
|
||||
Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm) {
|
||||
// we are trying to figure out which 360 half of the total 720 degree cycle is which, so we compare those in 360 degree sense.
|
||||
auto toothAngle360 = currentPhase;
|
||||
|
|
|
@ -10,7 +10,7 @@ TEST(trigger, map_cam_by_magic_point) {
|
|||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
||||
engineConfiguration->camInputs[0] = Gpio::A0;
|
||||
engineConfiguration->vvtMode[0] = VVT_MAP_V_TWIN_ANOTHER;
|
||||
engineConfiguration->vvtMode[0] = VVT_MAP_V_TWIN;
|
||||
eth.engine.periodicFastCallback(); // trigger limp mode
|
||||
ASSERT_FALSE(eth.engine.limpManager.allowIgnition());
|
||||
ASSERT_FALSE(eth.engine.limpManager.allowInjection());
|
||||
|
|
Loading…
Reference in New Issue