Fix regression from df22b1d41b
in Basic Distributor cranking RPM. Fixes #297
This commit is contained in:
parent
1c4a6b6f68
commit
3a73508cc3
|
@ -741,10 +741,9 @@ uint16_t getRPM_BasicDistributor()
|
|||
uint16_t tempRPM;
|
||||
if( currentStatus.RPM < currentStatus.crankRPM)
|
||||
{
|
||||
tempRPM = crankingGetRPM(triggerActualTeeth) / 2; //crankGetRPM uses teeth per 360 degrees. As triggerActualTeeh is total teeth in 720 degrees, we divide the tooth count by 2
|
||||
revolutionTime = revolutionTime >> 1; //Revolution time has to be divided by 2 as otherwise it would be over 720 degrees (triggerActualTeeth = nCylinders)
|
||||
tempRPM = crankingGetRPM( (triggerActualTeeth / 2) ); //crankGetRPM uses teeth per 360 degrees. As triggerActualTeeh is total teeth in 720 degrees, we divide the tooth count by 2
|
||||
}
|
||||
else { tempRPM = stdGetRPM(720); } //Multiply RPM by 2 due to tracking over 720 degrees now rather than 360
|
||||
else { tempRPM = stdGetRPM(720); }
|
||||
|
||||
MAX_STALL_TIME = revolutionTime << 1; //Set the stall time to be twice the current RPM. This is a safe figure as there should be no single revolution where this changes more than this
|
||||
if(triggerActualTeeth == 1) { MAX_STALL_TIME = revolutionTime << 1; } //Special case for 1 cylinder engines that only get 1 pulse every 720 degrees
|
||||
|
|
Loading…
Reference in New Issue