refactoring: naming consistency
This commit is contained in:
parent
c576f0a9d9
commit
6b10de5616
|
@ -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 Mon Feb 08 16:33:36 EST 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 Mon Feb 08 18:09:24 EST 2021
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -1512,8 +1512,6 @@ case VE_TPS:
|
|||
}
|
||||
const char *getVvt_mode_e(vvt_mode_e value){
|
||||
switch(value) {
|
||||
case MIATA_NB2:
|
||||
return "MIATA_NB2";
|
||||
case VVT_2JZ:
|
||||
return "VVT_2JZ";
|
||||
case VVT_4_1:
|
||||
|
@ -1526,6 +1524,8 @@ case VVT_FORD_ST170:
|
|||
return "VVT_FORD_ST170";
|
||||
case VVT_INACTIVE:
|
||||
return "VVT_INACTIVE";
|
||||
case VVT_MIATA_NB2:
|
||||
return "VVT_MIATA_NB2";
|
||||
case VVT_SECOND_HALF:
|
||||
return "VVT_SECOND_HALF";
|
||||
}
|
||||
|
|
|
@ -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 Mon Feb 08 16:33:35 EST 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 Mon Feb 08 18:09:24 EST 2021
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -1308,8 +1308,6 @@ case VE_TPS:
|
|||
}
|
||||
const char *getVvt_mode_e(vvt_mode_e value){
|
||||
switch(value) {
|
||||
case MIATA_NB2:
|
||||
return "MIATA_NB2";
|
||||
case VVT_2JZ:
|
||||
return "VVT_2JZ";
|
||||
case VVT_4_1:
|
||||
|
@ -1322,6 +1320,8 @@ case VVT_FORD_ST170:
|
|||
return "VVT_FORD_ST170";
|
||||
case VVT_INACTIVE:
|
||||
return "VVT_INACTIVE";
|
||||
case VVT_MIATA_NB2:
|
||||
return "VVT_MIATA_NB2";
|
||||
case VVT_SECOND_HALF:
|
||||
return "VVT_SECOND_HALF";
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->vvtCamSensorUseRise = true;
|
||||
// set vvt_mode 3
|
||||
engineConfiguration->vvtMode = MIATA_NB2;
|
||||
engineConfiguration->vvtMode = VVT_MIATA_NB2;
|
||||
engineConfiguration->vvtOffset = 98; // 2003 red car value
|
||||
|
||||
MEMCPY(config->veRpmBins, mazda_miata_nb2_RpmBins);
|
||||
|
|
|
@ -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 Mon Feb 08 16:33:35 EST 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 Mon Feb 08 18:09:24 EST 2021
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -1486,8 +1486,6 @@ case VE_TPS:
|
|||
}
|
||||
const char *getVvt_mode_e(vvt_mode_e value){
|
||||
switch(value) {
|
||||
case MIATA_NB2:
|
||||
return "MIATA_NB2";
|
||||
case VVT_2JZ:
|
||||
return "VVT_2JZ";
|
||||
case VVT_4_1:
|
||||
|
@ -1500,6 +1498,8 @@ case VVT_FORD_ST170:
|
|||
return "VVT_FORD_ST170";
|
||||
case VVT_INACTIVE:
|
||||
return "VVT_INACTIVE";
|
||||
case VVT_MIATA_NB2:
|
||||
return "VVT_MIATA_NB2";
|
||||
case VVT_SECOND_HALF:
|
||||
return "VVT_SECOND_HALF";
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ trigger_type_e getVvtTriggerType(vvt_mode_e vvtMode) {
|
|||
switch (vvtMode) {
|
||||
case VVT_2JZ:
|
||||
return TT_VVT_JZ;
|
||||
case MIATA_NB2:
|
||||
case VVT_MIATA_NB2:
|
||||
return TT_VVT_MIATA_NB2;
|
||||
case VVT_BOSCH_QUICK_START:
|
||||
return TT_VVT_BOSCH_QUICK_START;
|
||||
|
|
|
@ -439,7 +439,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
* Mazda NB2 has three cam tooth. We synchronize based on gap ratio.
|
||||
* @see TT_VVT_MIATA_NB2
|
||||
*/
|
||||
MIATA_NB2 = 3,
|
||||
VVT_MIATA_NB2 = 3,
|
||||
|
||||
/**
|
||||
* Single-tooth cam sensor mode where TDC and cam signal happen in the same 360 degree of 720 degree engine cycle
|
||||
|
|
|
@ -371,7 +371,7 @@ uint32_t *cyccnt = (uint32_t*) &DWT->CYCCNT;
|
|||
void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
ScopePerf perf(PE::MainTriggerCallback);
|
||||
|
||||
if (CONFIG(vvtMode) == MIATA_NB2 && ENGINE(triggerCentral.vvtSyncTimeNt) == 0) {
|
||||
if (CONFIG(vvtMode) == VVT_MIATA_NB2 && ENGINE(triggerCentral.vvtSyncTimeNt) == 0) {
|
||||
// this is a bit spaghetti code for sure
|
||||
// do not spark & do not fuel until we have VVT sync. NB2 is a special case
|
||||
// due to symmetrical crank wheel and we need to make sure no spark happens out of sync
|
||||
|
|
|
@ -84,7 +84,7 @@ angle_t TriggerCentral::getVVTPosition() {
|
|||
#define miataNbIndex (0)
|
||||
|
||||
static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
||||
return vvtMode == MIATA_NB2
|
||||
return vvtMode == VVT_MIATA_NB2
|
||||
|| vvtMode == VVT_BOSCH_QUICK_START
|
||||
|| vvtMode == VVT_FORD_ST170
|
||||
|| vvtMode == VVT_4_1;
|
||||
|
@ -197,7 +197,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
|
|||
return;
|
||||
}
|
||||
break;
|
||||
case MIATA_NB2:
|
||||
case VVT_MIATA_NB2:
|
||||
case VVT_BOSCH_QUICK_START:
|
||||
{
|
||||
if (engine->triggerCentral.vvtState[bankIndex].currentCycle.current_index != 0) {
|
||||
|
@ -258,7 +258,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
|
|||
}
|
||||
}
|
||||
break;
|
||||
case MIATA_NB2:
|
||||
case VVT_MIATA_NB2:
|
||||
/**
|
||||
* NB2 is a symmetrical crank, there are four phases total
|
||||
*/
|
||||
|
|
|
@ -13,7 +13,7 @@ TEST(trigger, testQuadCam) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
engineConfiguration->vvtMode = VVT_2JZ;
|
||||
engineConfiguration->secondVvtMode = MIATA_NB2;
|
||||
engineConfiguration->secondVvtMode = VVT_MIATA_NB2;
|
||||
|
||||
eth.setTriggerType(TT_ONE PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
engineConfiguration->camInputs[0] = GPIOA_10; // we just need to indicate that we have CAM
|
||||
|
|
Loading…
Reference in New Issue