diff --git a/speeduino/speeduino.ino b/speeduino/speeduino.ino index 66dac058..4d1a2a72 100644 --- a/speeduino/speeduino.ino +++ b/speeduino/speeduino.ino @@ -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) {