Honda K cam wheels #3405

This commit is contained in:
Andrey 2021-10-28 10:36:41 -04:00
parent 5fcb2f75a5
commit 5527f77589
3 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#include "global.h"
#include "rusefi_enums.h"
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Sun Oct 24 19:26:38 UTC 2021
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Oct 28 10:22:55 EDT 2021
// see also gen_config_and_enums.bat
@ -680,6 +680,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_INACTIVE:
return "VVT_INACTIVE";
case VVT_MIATA_NB2:

View File

@ -99,6 +99,8 @@ typedef enum __attribute__ ((__packed__)) {
VVT_BARRA_3_PLUS_1 = 8,
VVT_NISSAN_VQ = 9,
VVT_HONDA_K = 10,
} vvt_mode_e;
/**

View File

@ -103,6 +103,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_SECOND_HALF
&& vvtMode != VVT_FIRST_HALF;
}
@ -251,7 +252,8 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
bool isImportantFront = (CONFIG(vvtCamSensorUseRise) ^ (front == TV_FALL));
if (!vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]) && !isImportantFront) {
bool isVvtWithRealDecoder = vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]);
if (!isVvtWithRealDecoder && !isImportantFront) {
// todo: there should be a way to always use real trigger code for this logic?
return;
}
@ -269,12 +271,14 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
return;
}
tc->vvtState[bankIndex][camIndex].decodeTriggerEvent(
if (isVvtWithRealDecoder) {
tc->vvtState[bankIndex][camIndex].decodeTriggerEvent(
tc->vvtShape[camIndex],
nullptr,
nullptr,
engine->vvtTriggerConfiguration[camIndex],
front == TV_RISE ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING, nowNt);
}
tc->vvtCamCounter++;
@ -319,6 +323,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
#endif /* EFI_TUNER_STUDIO */
}
}
case VVT_HONDA_K:
default:
// else, do nothing
break;