Some incomplete work on 4g63 sequential
This commit is contained in:
parent
9af5534de4
commit
7adeeb3eaa
|
@ -653,6 +653,8 @@ void triggerSetup_4G63()
|
|||
toothAngles[3] = 355; //
|
||||
toothAngles[4] = 65; //
|
||||
toothAngles[5] = 115; //
|
||||
|
||||
triggerActualTeeth = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -666,6 +668,8 @@ void triggerSetup_4G63()
|
|||
toothAngles[5] = 465; //Rising edge of tooth #2
|
||||
toothAngles[6] = 535; //Falling edge of tooth #2
|
||||
toothAngles[7] = 645; //Rising edge of tooth #1
|
||||
|
||||
triggerActualTeeth = 4;
|
||||
}
|
||||
/*
|
||||
* https://forums.libreems.org/attachment.php?aid=34
|
||||
|
@ -703,7 +707,7 @@ void triggerPri_4G63()
|
|||
|
||||
toothCurrentCount++;
|
||||
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount > configPage1.nCylinders) ) //Trigger is on CHANGE, hence 4 pulses = 1 crank rev
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount > triggerActualTeeth) ) //Trigger is on CHANGE, hence 4 pulses = 1 crank rev
|
||||
{
|
||||
toothCurrentCount = 1; //Reset the counter
|
||||
toothOneMinusOneTime = toothOneTime;
|
||||
|
@ -716,16 +720,25 @@ void triggerPri_4G63()
|
|||
{
|
||||
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) && configPage2.ignCranklock && (currentStatus.startRevolutions >= configPage2.StgCycles))
|
||||
{
|
||||
if( toothCurrentCount == 1 ) { endCoil1Charge(); }
|
||||
else if( toothCurrentCount == 3 ) { endCoil2Charge(); }
|
||||
else if( toothCurrentCount == 5 ) { endCoil3Charge(); }
|
||||
if(configPage1.nCylinders == 4)
|
||||
{
|
||||
//This operates in forced wasted spark mode during cranking to align with crank teeth
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 5) ) { endCoil1Charge(); endCoil3Charge(); }
|
||||
else if( (toothCurrentCount == 3) || (toothCurrentCount == 7) ) { endCoil2Charge(); endCoil4Charge(); }
|
||||
}
|
||||
else if(configPage1.nCylinders == 6)
|
||||
{
|
||||
if( toothCurrentCount == 1 ) { endCoil1Charge(); }
|
||||
else if( toothCurrentCount == 3 ) { endCoil2Charge(); }
|
||||
else if( toothCurrentCount == 5 ) { endCoil3Charge(); }
|
||||
}
|
||||
}
|
||||
|
||||
//Whilst this is an uneven tooth pattern, if the specific angle between the last 2 teeth is specified, 1st deriv prediction can be used
|
||||
if( (configPage2.triggerFilter == 1) || (currentStatus.RPM < 1400) )
|
||||
{
|
||||
//Lite filter
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) )
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) || (toothCurrentCount == 7) )
|
||||
{
|
||||
triggerToothAngle = 70;
|
||||
triggerFilterTime = curGap; //Trigger filter is set to whatever time it took to do 70 degrees (Next trigger is 110 degrees away)
|
||||
|
@ -748,20 +761,20 @@ void triggerPri_4G63()
|
|||
else if(configPage2.triggerFilter == 2)
|
||||
{
|
||||
//Medium filter level
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) ) { triggerToothAngle = 70; triggerFilterTime = (curGap * 5) >> 2 ; } //87.5 degrees with a target of 110
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) || (toothCurrentCount == 7) ) { triggerToothAngle = 70; triggerFilterTime = (curGap * 5) >> 2 ; } //87.5 degrees with a target of 110
|
||||
else { triggerToothAngle = 110; triggerFilterTime = (curGap >> 1); } //55 degrees with a target of 70
|
||||
}
|
||||
else if (configPage2.triggerFilter == 3)
|
||||
{
|
||||
//Aggressive filter level
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) ) { triggerToothAngle = 70; triggerFilterTime = (curGap * 11) >> 3 ; } //96.26 degrees with a target of 110
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) || (toothCurrentCount == 7) ) { triggerToothAngle = 70; triggerFilterTime = (curGap * 11) >> 3 ; } //96.26 degrees with a target of 110
|
||||
else { triggerToothAngle = 110; triggerFilterTime = (curGap * 9) >> 5; } //61.87 degrees with a target of 70
|
||||
}
|
||||
else
|
||||
{
|
||||
//trigger filter is turned off.
|
||||
triggerFilterTime = 0;
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) ) { triggerToothAngle = 70; } //96.26 degrees with a target of 110
|
||||
if( (toothCurrentCount == 1) || (toothCurrentCount == 3) || (toothCurrentCount == 5) || (toothCurrentCount == 7) ) { triggerToothAngle = 70; } //96.26 degrees with a target of 110
|
||||
else { triggerToothAngle = 110; } //61.87 degrees with a target of 70
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue