Allow locked cranking timing for MazdaAU decoder

This commit is contained in:
Josh Stewart 2016-07-01 17:03:06 +10:00
parent a5536c9ffc
commit 990aa000a3
2 changed files with 5 additions and 3 deletions

View File

@ -37,6 +37,7 @@ A common function is simpler
*/
static inline int stdGetRPM()
{
if( !currentStatus.hasSync ) { return 0; } //Safety check
noInterrupts();
revolutionTime = (toothOneTime - toothOneMinusOneTime); //The time in uS that one revolution would take at current speed (The time tooth 1 was last seen, minus the time it was seen prior to that)
interrupts();
@ -1090,7 +1091,7 @@ void triggerPri_MazdaAU()
else if (!currentStatus.hasSync) { return; }
// Locked cranking timing is available, fixed at 12* BTDC
if ( configPage2.ignCranklock && BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) )
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) && configPage2.ignCranklock )
{
if( toothCurrentCount == 1 ) { endCoil1Charge(); }
else if( toothCurrentCount == 3 ) { endCoil2Charge(); }
@ -1134,8 +1135,9 @@ void triggerSec_MazdaAU()
secondaryToothCount = 2;
}
}
secondaryToothCount++;
}
secondaryToothCount++;
return;
}

View File

@ -772,7 +772,7 @@ page = 8
field = ""
field = "Cranking bypass", ignBypassEnable
field = "Bypass output pin", ignBypassPin { ignBypassEnable }
field = "Fix cranking timing with trigger", ignCranklock, { TrigPattern == 1 || TrigPattern == 4 }
field = "Fix cranking timing with trigger", ignCranklock, { TrigPattern == 1 || TrigPattern == 4 || TrigPattern == 10}
dialog = aseSettings, "Afterstart Enrichment"
field = "Enrichment %", asePct