Nissan 360: make sure elapsedTime variable is set. Fixes #705

This commit is contained in:
Josh Stewart 2022-10-03 15:43:43 +11:00
parent 11024a2070
commit 4de389d0c2
1 changed files with 1 additions and 0 deletions

View File

@ -2780,6 +2780,7 @@ int getCrankAngle_Nissan360()
crankAngle = ( (tempToothCurrentCount - 1) * 2) + configPage4.triggerAngle;
unsigned long halfTooth = (tempToothLastToothTime - tempToothLastMinusOneToothTime) / 2;
elapsedTime = (lastCrankAngleCalc - tempToothLastToothTime);
if (elapsedTime > halfTooth)
{
//Means we're over halfway to the next tooth, so add on 1 degree