Fix logic from bd25dee
This commit is contained in:
parent
f14edc6d6c
commit
0a5182f353
|
@ -483,7 +483,8 @@ void loop(void)
|
|||
//***********************************************************************************************
|
||||
//BEGIN INJECTION TIMING
|
||||
currentStatus.injAngle = table2D_getValue(&injectorAngleTable, currentStatus.RPMdiv100);
|
||||
currentStatus.injAngle = max(currentStatus.injAngle, uint16_t(CRANK_ANGLE_MAX_INJ) );
|
||||
if(currentStatus.injAngle > uint16_t(CRANK_ANGLE_MAX_INJ)) { currentStatus.injAngle = uint16_t(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