we already have vvtCamCounter doing same exact thing

This commit is contained in:
rusefi 2023-09-27 23:22:18 -04:00
parent 1e978bcd73
commit 7624c91bec
2 changed files with 2 additions and 3 deletions

View File

@ -323,6 +323,7 @@ void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
tc->triggerState.vvtStateIndex = vvtDecoder.currentCycle.current_index;
}
// here we count all cams together
tc->vvtCamCounter++;
auto currentPhase = tc->getCurrentEnginePhase(nowNt);
@ -366,8 +367,6 @@ void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
break;
}
tc->triggerState.vvtCounter++;
auto vvtPosition = engineConfiguration->vvtOffsets[bankIndex * CAMS_PER_BANK + camIndex] - currentPosition;
// this could be just an 'if' but let's have it expandable for future use :)

View File

@ -6,7 +6,7 @@ struct_no_prefix trigger_state_s
float triggerSyncGapRatio;@@GAUGE_NAME_TRG_GAP@@;"", 1, 0, -10000, 10000, 3
uint8_t triggerStateIndex
uint8_t vvtCounter
uint8_t camResyncCounter;sync: Phase Re-Sync Counter
uint8_t vvtStateIndex
end_struct