Tweaks to Audi135 decoder

This commit is contained in:
Josh Stewart 2015-12-15 17:23:49 +11:00
parent 271b3dc37a
commit bd0fc5806b
1 changed files with 2 additions and 4 deletions

View File

@ -696,22 +696,20 @@ void triggerPri_Audi135()
curGap = curTime - toothLastToothTime;
if ( curGap < triggerFilterTime ) { return; } //Debounce check. Pulses should never be less than triggerFilterTime, so if they are it means a false trigger. (A 36-1 wheel at 8000pm will have triggers approx. every 200uS)
toothSystemCount++;
addToothLogEntry(curGap);
if ( toothSystemCount != 3 ) { return; } //We only proceed for every third tooth
toothSystemCount = 0;
toothCurrentCount++; //Increment the tooth counter
if ( toothCurrentCount == 1 || toothCurrentCount > configPage2.triggerTeeth)
if ( toothCurrentCount == 1 || toothCurrentCount > 45)
{
toothCurrentCount = 1;
toothOneMinusOneTime = toothOneTime;
toothOneTime = curTime;
startRevolutions++; //Counter
currentStatus.hasSync = true;
//if ((startRevolutions & 63) == 1) { currentStatus.hasSync = false; } //Every 64 revolutions, force a resync with the cam
}
addToothLogEntry(curGap);
toothLastMinusOneToothTime = toothLastToothTime;
toothLastToothTime = curTime;
}