moving confusion further away from fuel control

This commit is contained in:
Andrey 2022-08-31 23:49:38 -04:00
parent 398003c65d
commit 28d797d5c2
2 changed files with 8 additions and 7 deletions

View File

@ -383,13 +383,6 @@ void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp, angle_
}
#endif // HW_CHECK_MODE
#if EFI_CDM_INTEGRATION
if (trgEventIndex == 0 && isBrainPinValid(engineConfiguration->cdmInputPin)) {
int cdmKnockValue = getCurrentCdmValue(engine->triggerCentral.triggerState.getTotalRevolutionCounter());
engine->knockLogic(cdmKnockValue);
}
#endif /* EFI_CDM_INTEGRATION */
int rpm = engine->rpmCalculator.getCachedRpm();
if (rpm == 0) {
// this happens while we just start cranking

View File

@ -750,6 +750,14 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta
wrapAngle(nextPhase, "nextEnginePhase", CUSTOM_ERR_6555);
} while (nextPhase == currentPhase);
#if EFI_CDM_INTEGRATION
if (trgEventIndex == 0 && isBrainPinValid(engineConfiguration->cdmInputPin)) {
int cdmKnockValue = getCurrentCdmValue(engine->triggerCentral.triggerState.getTotalRevolutionCounter());
engine->knockLogic(cdmKnockValue);
}
#endif /* EFI_CDM_INTEGRATION */
// Handle ignition and injection
mainTriggerCallback(triggerIndexForListeners, timestamp, currentPhase, nextPhase);