Fix for new ign mode on 8 cylinder, single channel output
This commit is contained in:
parent
d53b94c4ef
commit
b8df0a0890
|
@ -1038,7 +1038,9 @@ void triggerSetEndTeeth_BasicDistributor()
|
||||||
int tempEndAngle = (ignition1EndAngle - configPage4.triggerAngle);
|
int tempEndAngle = (ignition1EndAngle - configPage4.triggerAngle);
|
||||||
tempEndAngle = ignitionLimits((tempEndAngle));
|
tempEndAngle = ignitionLimits((tempEndAngle));
|
||||||
|
|
||||||
|
switch(configPage2.nCylinders)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
if( (tempEndAngle > 180) || (tempEndAngle <= 0) )
|
if( (tempEndAngle > 180) || (tempEndAngle <= 0) )
|
||||||
{
|
{
|
||||||
ignition1EndTooth = 2;
|
ignition1EndTooth = 2;
|
||||||
|
@ -1049,6 +1051,61 @@ void triggerSetEndTeeth_BasicDistributor()
|
||||||
ignition1EndTooth = 1;
|
ignition1EndTooth = 1;
|
||||||
ignition2EndTooth = 2;
|
ignition2EndTooth = 2;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 3: //Shared with 6 cylinder
|
||||||
|
case 6:
|
||||||
|
if( (tempEndAngle > 120) && (tempEndAngle <= 240) )
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 2;
|
||||||
|
ignition2EndTooth = 3;
|
||||||
|
ignition3EndTooth = 1;
|
||||||
|
}
|
||||||
|
else if( (tempEndAngle > 240) || (tempEndAngle <= 0) )
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 3;
|
||||||
|
ignition2EndTooth = 1;
|
||||||
|
ignition3EndTooth = 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 1;
|
||||||
|
ignition2EndTooth = 2;
|
||||||
|
ignition3EndTooth = 3;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
if( (tempEndAngle > 90) && (tempEndAngle <= 180) )
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 2;
|
||||||
|
ignition2EndTooth = 3;
|
||||||
|
ignition3EndTooth = 4;
|
||||||
|
ignition4EndTooth = 1;
|
||||||
|
}
|
||||||
|
else if( (tempEndAngle > 180) && (tempEndAngle <= 270) )
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 3;
|
||||||
|
ignition2EndTooth = 4;
|
||||||
|
ignition3EndTooth = 1;
|
||||||
|
ignition4EndTooth = 2;
|
||||||
|
}
|
||||||
|
else if( (tempEndAngle > 270) || (tempEndAngle <= 0) )
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 4;
|
||||||
|
ignition2EndTooth = 1;
|
||||||
|
ignition3EndTooth = 2;
|
||||||
|
ignition4EndTooth = 3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ignition1EndTooth = 1;
|
||||||
|
ignition2EndTooth = 2;
|
||||||
|
ignition3EndTooth = 3;
|
||||||
|
ignition4EndTooth = 4;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lastToothCalcAdvance = currentStatus.advance;
|
lastToothCalcAdvance = currentStatus.advance;
|
||||||
|
|
|
@ -799,13 +799,12 @@ void initialiseAll()
|
||||||
channel4IgnDegrees = 270;
|
channel4IgnDegrees = 270;
|
||||||
maxIgnOutputs = 4;
|
maxIgnOutputs = 4;
|
||||||
|
|
||||||
#if IGN_CHANNELS >= 1
|
|
||||||
if( (configPage4.sparkMode == IGN_MODE_SINGLE))
|
if( (configPage4.sparkMode == IGN_MODE_SINGLE))
|
||||||
{
|
{
|
||||||
maxIgnOutputs = 1;
|
maxIgnOutputs = 4;
|
||||||
CRANK_ANGLE_MAX_IGN = 90;
|
CRANK_ANGLE_MAX_IGN = 360;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IGN_CHANNELS >= 8
|
#if IGN_CHANNELS >= 8
|
||||||
if( (configPage4.sparkMode == IGN_MODE_SEQUENTIAL))
|
if( (configPage4.sparkMode == IGN_MODE_SEQUENTIAL))
|
||||||
|
|
Loading…
Reference in New Issue