diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 6b2c554dcf..dcea4fb775 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -215,7 +215,10 @@ void printOverallStatus(efitimesec_t nowSeconds) { #if EFI_PROD_CODE printOutPin(PROTOCOL_CRANK1, CONFIG(triggerInputPins)[0]); printOutPin(PROTOCOL_CRANK2, CONFIG(triggerInputPins)[1]); - printOutPin(PROTOCOL_VVT_NAME, engineConfiguration->camInputs[0]); + for (int i = 0;icamInputs[i]); + } printOutPin(PROTOCOL_HIP_NAME, CONFIG(hip9011IntHoldPin)); printOutPin(PROTOCOL_TACH_NAME, CONFIG(tachOutputPin)); #if EFI_LOGIC_ANALYZER diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index 2e6256dfdc..a43d18d1f0 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -39,6 +39,12 @@ pin_output_mode_e INVERTED_OUTPUT = OM_INVERTED; static const char *sparkNames[] = { "Coil 1", "Coil 2", "Coil 3", "Coil 4", "Coil 5", "Coil 6", "Coil 7", "Coil 8", "Coil 9", "Coil 10", "Coil 11", "Coil 12"}; +const char *vvtNames[] = { + PROTOCOL_VVT1_NAME, + PROTOCOL_VVT2_NAME, + PROTOCOL_VVT3_NAME, + PROTOCOL_VVT4_NAME}; + // these short names are part of engine sniffer protocol static const char *sparkShortNames[] = { PROTOCOL_COIL1_SHORT_NAME, "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "cA", "cB", "cD"}; diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index bed8e1c891..ffc0660ffc 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -102,6 +102,8 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL } else { tc->vvtEventFallCounter++; } + extern const char *vvtNames[]; + const char vvtName = vvtNames[index]; #if VR_HW_CHECK_MODE // some boards do not have hardware VR input LEDs which makes such boards harder to validate @@ -119,7 +121,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL #endif // VR_HW_CHECK_MODE if (!CONFIG(displayLogicLevelsInEngineSniffer)) { - addEngineSnifferEvent(PROTOCOL_VVT_NAME, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN); + addEngineSnifferEvent(vvtName, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN); #if EFI_TOOTH_LOGGER if (front == TV_RISE) { @@ -145,16 +147,16 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); #endif /* EFI_TOOTH_LOGGER */ - addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_UP); - addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_DOWN); + addEngineSnifferEvent(vvtName, PROTOCOL_ES_UP); + addEngineSnifferEvent(vvtName, PROTOCOL_ES_DOWN); } else { #if EFI_TOOTH_LOGGER LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); #endif /* EFI_TOOTH_LOGGER */ - addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_DOWN); - addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_UP); + addEngineSnifferEvent(vvtName, PROTOCOL_ES_DOWN); + addEngineSnifferEvent(vvtName, PROTOCOL_ES_UP); } } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 83ecd6a153..cec92d8c89 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1861,7 +1861,10 @@ end_struct #define PROTOCOL_CRANK2 "t2" #define PROTOCOL_CRANK3 "t3" -#define PROTOCOL_VVT_NAME "VVT" +#define PROTOCOL_VVT1_NAME "VVT1" +#define PROTOCOL_VVT2_NAME "VVT2" +#define PROTOCOL_VVT3_NAME "VVT3" +#define PROTOCOL_VVT4_NAME "VVT4" #define PROTOCOL_HIP_NAME "HIP" #define PROTOCOL_TACH_NAME "tach" #define PROTOCOL_HPFP_NAME "hpfp"