VVT support for VAG trigger fix #883

This commit is contained in:
rusefi 2020-08-27 01:01:03 -04:00
parent 9488253b89
commit bf2d51b8c3
2 changed files with 2 additions and 25 deletions

View File

@ -85,8 +85,6 @@ void addTriggerEventListener(ShaftPositionListener listener, const char *name, E
engine->triggerCentral.addEventListener(listener, name, engine);
}
#define miataNb2VVTRatioFrom (8.50 * 0.75)
#define miataNb2VVTRatioTo (14)
#define miataNbIndex (0)
void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX) {
@ -178,30 +176,12 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_
}
break;
case MIATA_NB2:
case VVT_BOSCH_QUICK_START:
{
uint32_t currentDuration = nowNt - tc->previousVvtCamTime;
float ratio = ((float) currentDuration) / tc->previousVvtCamDuration;
if (engineConfiguration->debugMode == DBG_VVT) {
#if EFI_TUNER_STUDIO
tsOutputChannels.debugFloatField2 = ratio;
#endif /* EFI_TUNER_STUDIO */
}
tc->previousVvtCamDuration = currentDuration;
tc->previousVvtCamTime = nowNt;
if (engineConfiguration->verboseTriggerSynchDetails) {
scheduleMsg(logger, "vvt ratio %.2f", ratio);
}
if (ratio < miataNb2VVTRatioFrom || ratio > miataNb2VVTRatioTo) {
if (engine->triggerCentral.vvtState.currentCycle.current_index != 0) {
// this is not NB2 sync tooth - exiting
return;
}
if (engineConfiguration->verboseTriggerSynchDetails) {
scheduleMsg(logger, "looks good: vvt ratio %.2f", ratio);
}
if (engineConfiguration->debugMode == DBG_VVT) {
#if EFI_TUNER_STUDIO
tsOutputChannels.debugIntField1++;

View File

@ -68,9 +68,6 @@ public:
TriggerFormDetails triggerFormDetails;
efitick_t previousVvtCamTime = DEEP_IN_THE_PAST_SECONDS * NT_PER_SECOND;
efitick_t previousVvtCamDuration = 0;
private:
IntListenerArray<15> triggerListeneres;
};