M62T vanos support #2243
This commit is contained in:
parent
01fd8ac18a
commit
c0e9d2914b
|
@ -225,10 +225,11 @@ static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
|
||||
efitick_t nowNt = getTimeNowNt();
|
||||
|
||||
if (nowNt - engine->triggerCentral.vvtSyncTimeNt >= NT_PER_SECOND) {
|
||||
// loss of VVT sync
|
||||
engine->triggerCentral.vvtSyncTimeNt = 0;
|
||||
for (int bankIndex = 0; bankIndex < BANKS_COUNT; bankIndex++) {
|
||||
if (nowNt - engine->triggerCentral.vvtSyncTimeNt[bankIndex] >= NT_PER_SECOND) {
|
||||
// loss of VVT sync
|
||||
engine->triggerCentral.vvtSyncTimeNt[bankIndex] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// for performance reasons this assertion related to mainTriggerCallback should better be here
|
||||
|
|
|
@ -47,7 +47,7 @@ WaveChart waveChart;
|
|||
trigger_central_s::trigger_central_s() : hwEventCounters() {
|
||||
}
|
||||
|
||||
TriggerCentral::TriggerCentral() : trigger_central_s() {
|
||||
TriggerCentral::TriggerCentral() : trigger_central_s(), vvtSyncTimeNt() {
|
||||
triggerState.resetTriggerState();
|
||||
noiseFilter.resetAccumSignalData();
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_
|
|||
break;
|
||||
}
|
||||
|
||||
tc->vvtSyncTimeNt = nowNt;
|
||||
tc->vvtSyncTimeNt[bankIndex] = nowNt;
|
||||
|
||||
// we do NOT clamp VVT position into the [0, engineCycle) range - we expect vvtOffset to be configured so that
|
||||
// it's not necessary
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
*/
|
||||
efitick_t timeAtVirtualZeroNt = 0;
|
||||
|
||||
efitick_t vvtSyncTimeNt = 0;
|
||||
efitick_t vvtSyncTimeNt[BANKS_COUNT];
|
||||
|
||||
TriggerStateWithRunningStatistics triggerState;
|
||||
TriggerWaveform triggerShape;
|
||||
|
|
Loading…
Reference in New Issue