Correctly handle case where sequential ignition is combined with more than 2 squirts per cycle. Is a potential fix for #187

This commit is contained in:
Josh Stewart 2019-01-15 17:15:56 +11:00
parent 4af8c5d4f6
commit 1fabf639c5
1 changed files with 1 additions and 1 deletions

View File

@ -686,7 +686,7 @@ void loop()
//Determine the current crank angle
int crankAngle = getCrankAngle();
if (crankAngle > CRANK_ANGLE_MAX_INJ ) { crankAngle -= CRANK_ANGLE_MAX_INJ; }
while(crankAngle > CRANK_ANGLE_MAX_INJ ) { crankAngle = crankAngle - CRANK_ANGLE_MAX_INJ; } //Continue reducing the crank angle by the max injection amount until it's below the required limit. This will usually only run (at most) once, but in cases where there is sequential ignition and more than 2 squirts per cycle, it may run up to 4 times.
if(Serial && false)
{