Fix missing MAP reset in new error checking code

This commit is contained in:
Josh Stewart 2015-12-13 16:53:36 +11:00
parent 1bc999ba49
commit bc92bcad0f
2 changed files with 4 additions and 3 deletions

View File

@ -417,8 +417,8 @@ void triggerPri_4G63()
addToothLogEntry(curGap);
//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(toothCurrentCount == 1 || toothCurrentCount == 3) { triggerToothAngle = 70; triggerFilterTime = curGap; } //Trigger filter is set to whatever time it took to do 70 degrees (Next trigger is 110 degrees away)
else { triggerToothAngle = 110; triggerFilterTime = (curGap * 3) >> 3; } //Trigger filter is set to (110*3)/8=41.25=41 degrees (Next trigger is 70 degrees away).
if(toothCurrentCount == 1 || toothCurrentCount == 3) { triggerToothAngle = 70; }//triggerFilterTime = curGap; } //Trigger filter is set to whatever time it took to do 70 degrees (Next trigger is 110 degrees away)
else { triggerToothAngle = 110; }//triggerFilterTime = (curGap * 3) >> 3; } //Trigger filter is set to (110*3)/8=41.25=41 degrees (Next trigger is 70 degrees away).
toothLastMinusOneToothTime = toothLastToothTime;
toothLastToothTime = curTime;
@ -440,7 +440,7 @@ void triggerSec_4G63()
toothCurrentCount = 4; //If the crank trigger is currently HIGH, it means we're on tooth #1
}
}
//else { triggerFilterTime = 1500; } //reset filter time (ugly)
else { triggerFilterTime = 1500; } //reset filter time (ugly)
return;
}

View File

@ -575,6 +575,7 @@ void loop()
currentStatus.runSecs = 0; //Reset the counter for number of seconds running.
secCounter = 0; //Reset our seconds counter.
startRevolutions = 0;
MAPcurRev = 0;
currentStatus.rpmDOT = 0;
ignitionOn = false;
fuelOn = false;