Fix Miata 99-05 new ignition mode conditional (#918)
It was being applied when the trigger angle==0 regardless of the perToothIgn ignition flag: replace || with &&.
This commit is contained in:
parent
8e2fb0b36e
commit
ad7d4f6ae9
|
@ -2186,18 +2186,16 @@ void triggerPri_Miata9905(void)
|
|||
|
||||
//EXPERIMENTAL!
|
||||
//New ignition mode is ONLY available on 9905 when the trigger angle is set to the stock value of 0.
|
||||
if( (configPage2.perToothIgn == true) || (configPage4.triggerAngle == 0) )
|
||||
if( (configPage2.perToothIgn == true)
|
||||
&& (configPage4.triggerAngle == 0)
|
||||
&& (currentStatus.advance > 0) )
|
||||
{
|
||||
if (currentStatus.advance > 0)
|
||||
{
|
||||
int16_t crankAngle = ignitionLimits( toothAngles[(toothCurrentCount-1)] );
|
||||
int16_t crankAngle = ignitionLimits( toothAngles[(toothCurrentCount-1)] );
|
||||
|
||||
//Handle non-sequential tooth counts
|
||||
if( (configPage4.sparkMode != IGN_MODE_SEQUENTIAL) && (toothCurrentCount > configPage2.nCylinders) ) { checkPerToothTiming(crankAngle, (toothCurrentCount-configPage2.nCylinders) ); }
|
||||
else { checkPerToothTiming(crankAngle, toothCurrentCount); }
|
||||
}
|
||||
//Handle non-sequential tooth counts
|
||||
if( (configPage4.sparkMode != IGN_MODE_SEQUENTIAL) && (toothCurrentCount > configPage2.nCylinders) ) { checkPerToothTiming(crankAngle, (toothCurrentCount-configPage2.nCylinders) ); }
|
||||
else { checkPerToothTiming(crankAngle, toothCurrentCount); }
|
||||
}
|
||||
|
||||
} //Has sync
|
||||
|
||||
toothLastMinusOneToothTime = toothLastToothTime;
|
||||
|
|
Loading…
Reference in New Issue