mirror of https://github.com/rusefi/speeduino.git
Allow for 0ms injector pulse if VE lookup is 0
This commit is contained in:
parent
bd0fc5806b
commit
e00de31a37
|
@ -931,7 +931,7 @@ void loop()
|
|||
//Determine the current crank angle
|
||||
int crankAngle = getCrankAngle(timePerDegree);
|
||||
|
||||
if (fuelOn)
|
||||
if (fuelOn && currentStatus.PW > 0)
|
||||
{
|
||||
if (injector1StartAngle > crankAngle)
|
||||
{
|
||||
|
|
|
@ -301,6 +301,8 @@ unsigned int PW(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen, b
|
|||
//intermediate = (intermediate * iMAP) >> 7;
|
||||
intermediate = (intermediate * iCorrections) >> 7;
|
||||
//intermediate = (intermediate * iTPS) >> 7;
|
||||
if(intermediate == 0) { return 0; } //If the pulsewidth is 0, we return here before the opening time gets added
|
||||
|
||||
intermediate += injOpen; //Add the injector opening time
|
||||
if ( intermediate > 65535) {
|
||||
intermediate = 65535; //Make sure this won't overflow when we convert to uInt. This means the maximum pulsewidth possible is 65.535mS
|
||||
|
|
Loading…
Reference in New Issue