Small improvement to 4g63 cranking

This commit is contained in:
Josh Stewart 2016-04-24 20:58:18 +10:00
parent e1472df669
commit 52876b7751
1 changed files with 3 additions and 1 deletions

View File

@ -491,7 +491,9 @@ int getRPM_4G63()
revolutionTime = (toothLastToothTime - toothLastMinusOneToothTime); //Note that trigger tooth angle changes between 70 and 110 depending on the last tooth that was seen
interrupts();
revolutionTime = revolutionTime * 36;
return (tempToothAngle * 60000000L) / revolutionTime;
int tempRPM = (tempToothAngle * 60000000L) / revolutionTime;
if(tempRPM >= 1000) { return currentStatus.RPM; } //Hack, but works well at avoiding erratic starting RPM.
return tempRPM;
}
else { return stdGetRPM(); }
}