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();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
|
for (int bankIndex = 0; bankIndex < BANKS_COUNT; bankIndex++) {
|
||||||
if (nowNt - engine->triggerCentral.vvtSyncTimeNt >= NT_PER_SECOND) {
|
if (nowNt - engine->triggerCentral.vvtSyncTimeNt[bankIndex] >= NT_PER_SECOND) {
|
||||||
// loss of VVT sync
|
// loss of VVT sync
|
||||||
engine->triggerCentral.vvtSyncTimeNt = 0;
|
engine->triggerCentral.vvtSyncTimeNt[bankIndex] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// for performance reasons this assertion related to mainTriggerCallback should better be here
|
// 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() {
|
trigger_central_s::trigger_central_s() : hwEventCounters() {
|
||||||
}
|
}
|
||||||
|
|
||||||
TriggerCentral::TriggerCentral() : trigger_central_s() {
|
TriggerCentral::TriggerCentral() : trigger_central_s(), vvtSyncTimeNt() {
|
||||||
triggerState.resetTriggerState();
|
triggerState.resetTriggerState();
|
||||||
noiseFilter.resetAccumSignalData();
|
noiseFilter.resetAccumSignalData();
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_
|
||||||
break;
|
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
|
// we do NOT clamp VVT position into the [0, engineCycle) range - we expect vvtOffset to be configured so that
|
||||||
// it's not necessary
|
// it's not necessary
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
*/
|
*/
|
||||||
efitick_t timeAtVirtualZeroNt = 0;
|
efitick_t timeAtVirtualZeroNt = 0;
|
||||||
|
|
||||||
efitick_t vvtSyncTimeNt = 0;
|
efitick_t vvtSyncTimeNt[BANKS_COUNT];
|
||||||
|
|
||||||
TriggerStateWithRunningStatistics triggerState;
|
TriggerStateWithRunningStatistics triggerState;
|
||||||
TriggerWaveform triggerShape;
|
TriggerWaveform triggerShape;
|
||||||
|
|
Loading…
Reference in New Issue