Ensure injector end angle is not greater than the maximum inj angle
This commit is contained in:
parent
fff315aa45
commit
bd25deec40
|
@ -483,6 +483,7 @@ void loop(void)
|
|||
//***********************************************************************************************
|
||||
//BEGIN INJECTION TIMING
|
||||
currentStatus.injAngle = table2D_getValue(&injectorAngleTable, currentStatus.RPMdiv100);
|
||||
currentStatus.injAngle = max(currentStatus.injAngle, CRANK_ANGLE_MAX_INJ);
|
||||
unsigned int PWdivTimerPerDegree = timeToAngleDegPerMicroSec(currentStatus.PW1); //How many crank degrees the calculated PW will take at the current speed
|
||||
|
||||
injector1StartAngle = calculateInjectorStartAngle(PWdivTimerPerDegree, channel1InjDegrees, currentStatus.injAngle);
|
||||
|
|
Loading…
Reference in New Issue