Nissan 360: make sure elapsedTime variable is set. Fixes #705
This commit is contained in:
parent
3997708997
commit
c8d51d686b
|
@ -2780,6 +2780,7 @@ int getCrankAngle_Nissan360()
|
||||||
|
|
||||||
crankAngle = ( (tempToothCurrentCount - 1) * 2) + configPage4.triggerAngle;
|
crankAngle = ( (tempToothCurrentCount - 1) * 2) + configPage4.triggerAngle;
|
||||||
unsigned long halfTooth = (tempToothLastToothTime - tempToothLastMinusOneToothTime) / 2;
|
unsigned long halfTooth = (tempToothLastToothTime - tempToothLastMinusOneToothTime) / 2;
|
||||||
|
elapsedTime = (lastCrankAngleCalc - tempToothLastToothTime);
|
||||||
if (elapsedTime > halfTooth)
|
if (elapsedTime > halfTooth)
|
||||||
{
|
{
|
||||||
//Means we're over halfway to the next tooth, so add on 1 degree
|
//Means we're over halfway to the next tooth, so add on 1 degree
|
||||||
|
|
Loading…
Reference in New Issue