fix CRANK_ANGLE_MAX_INJ always 360 (#313)

This commit is contained in:
Bruno Bousquet 2020-01-29 20:38:11 -05:00 committed by GitHub
parent 6f8c126581
commit 1d456c7ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -331,8 +331,6 @@ void initialiseAll()
currentStatus.nSquirts = configPage2.nCylinders / configPage2.divider; //The number of squirts being requested. This is manaully overriden below for sequential setups (Due to TS req_fuel calc limitations)
if(currentStatus.nSquirts == 0) { currentStatus.nSquirts = 1; } //Safety check. Should never happen as TS will give an error, but leave incase tune is manually altered etc.
if(configPage2.strokes == FOUR_STROKE) { CRANK_ANGLE_MAX_INJ = 720 / currentStatus.nSquirts; }
else { CRANK_ANGLE_MAX_INJ = 360 / currentStatus.nSquirts; }
//Calculate the number of degrees between cylinders
//Swet some default values. These will be updated below if required.
@ -354,6 +352,9 @@ void initialiseAll()
ignition4EndAngle = 0;
ignition5EndAngle = 0;
if(configPage2.strokes == FOUR_STROKE) { CRANK_ANGLE_MAX_INJ = 720 / currentStatus.nSquirts; }
else { CRANK_ANGLE_MAX_INJ = 360 / currentStatus.nSquirts; }
switch (configPage2.nCylinders) {
case 1:
channel1IgnDegrees = 0;