refactoring: better place for cam validation
This commit is contained in:
parent
c60e0382dc
commit
a3d51d8b49
|
@ -316,9 +316,6 @@ void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp, angle_
|
|||
bool limitedFuel = !limitedFuelState.value;
|
||||
|
||||
if (trgEventIndex == 0) {
|
||||
if (HAVE_CAM_INPUT()) {
|
||||
engine->triggerCentral.validateCamVvtCounters();
|
||||
}
|
||||
|
||||
if (engine->triggerCentral.checkIfTriggerConfigChanged()) {
|
||||
engine->ignitionEvents.isReady = false; // we need to rebuild complete ignition schedule
|
||||
|
|
|
@ -238,6 +238,11 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
|
|||
RpmCalculator *rpmState = &engine->rpmCalculator;
|
||||
|
||||
if (trgEventIndex == 0) {
|
||||
if (HAVE_CAM_INPUT()) {
|
||||
engine->triggerCentral.validateCamVvtCounters();
|
||||
}
|
||||
|
||||
|
||||
bool hadRpmRecently = rpmState->checkIfSpinning(nowNt);
|
||||
|
||||
float periodSeconds = engine->rpmCalculator.lastTdcTimer.getElapsedSecondsAndReset(nowNt);
|
||||
|
|
Loading…
Reference in New Issue