Global injector closing angle

When user disables individual injector close angle the injectors just go off one setting.
This commit is contained in:
ConnerMcLaughlin 2016-12-27 13:33:27 -06:00 committed by GitHub
parent b5b5155bf8
commit bd6fb72ae2
1 changed files with 2 additions and 1 deletions

View File

@ -1046,6 +1046,7 @@ void loop()
//BEGIN INJECTION TIMING
//Determine next firing angles
currentStatus.PW2 = currentStatus.PW3 = currentStatus.PW4 = currentStatus.PW1; // Initial state is for all pulsewidths to be the same (This gets changed below)
if(!configPage1.indInjAng) {configPage1.inj4Ang = configPage1.inj3Ang = configPage1.inj2Ang = configPage1.inj1Ang;} //Forcing all injector close angles to be the same.
int PWdivTimerPerDegree = div(currentStatus.PW1, timePerDegree).quot; //How many crank degrees the calculated PW will take at the current speed
injector1StartAngle = configPage1.inj1Ang - ( PWdivTimerPerDegree ); //This is a little primitive, but is based on the idea that all fuel needs to be delivered before the inlet valve opens. See http://www.extraefi.co.uk/sequential_fuel.html for more detail
if(injector1StartAngle < 0) {injector1StartAngle += CRANK_ANGLE_MAX_INJ;}
@ -1506,4 +1507,4 @@ void endCoil2and4Charge() { digitalWrite(pinCoil2, coilLOW); digitalWrite(pinCoi
void nullCallback() { return; }