ignition timing clamping settings

only:atomic change around timing range
This commit is contained in:
rusefi 2023-07-21 23:48:58 -04:00
parent 2a5772374c
commit 4fbc9d7b06
1 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,11 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
angle_t finalIgnitionTiming = getEngineState()->timingAdvance[event->cylinderNumber];
// 10 ATDC ends up as 710, convert it to -10 so we can log and clamp correctly
if (finalIgnitionTiming > 360) {
finalIgnitionTiming -= 720;
}
engine->outputChannels.ignitionAdvanceCyl[event->cylinderIndex] = finalIgnitionTiming;
angle_t sparkAngle =