Fix poor cranking to running transition on 36-2-2-2
This commit is contained in:
parent
349d03249d
commit
85a1a1a23c
|
@ -3209,7 +3209,7 @@ void triggerPri_ThirtySixMinus222()
|
|||
{
|
||||
if(toothSystemCount == 1)
|
||||
{
|
||||
//This occurs when where at the first tooth after the 2 lots of 2x missing tooth.
|
||||
//This occurs when we're at the first tooth after the 2 lots of 2x missing tooth.
|
||||
toothCurrentCount = 19;
|
||||
toothSystemCount = 0;
|
||||
currentStatus.hasSync = true;
|
||||
|
@ -3269,6 +3269,25 @@ void triggerSec_ThirtySixMinus222()
|
|||
//NOT USED - This pattern uses the missing tooth version of this function
|
||||
}
|
||||
|
||||
uint16_t getRPM_ThirtySixMinus222()
|
||||
{
|
||||
uint16_t tempRPM = 0;
|
||||
if( currentStatus.RPM < currentStatus.crankRPM)
|
||||
{
|
||||
//
|
||||
if( (toothCurrentCount != 19) && (toothCurrentCount != 16) && (toothCurrentCount != 34) && (triggerToothAngleIsCorrect == true) )
|
||||
{
|
||||
tempRPM = crankingGetRPM(36);
|
||||
}
|
||||
else { tempRPM = currentStatus.RPM; } //Can't do per tooth RPM if we're at tooth #1 as the missing tooth messes the calculation
|
||||
}
|
||||
else
|
||||
{
|
||||
tempRPM = stdGetRPM(360);
|
||||
}
|
||||
return tempRPM;
|
||||
}
|
||||
|
||||
int getCrankAngle_ThirtySixMinus222()
|
||||
{
|
||||
//NOT USED - This pattern uses the missing tooth version of this function
|
||||
|
|
|
@ -2600,7 +2600,7 @@ void initialiseTriggers()
|
|||
triggerHandler = triggerPri_ThirtySixMinus222;
|
||||
triggerSecondaryHandler = triggerSec_ThirtySixMinus222;
|
||||
decoderHasSecondary = true;
|
||||
getRPM = getRPM_missingTooth; //This uses the same function as the missing tooth decoder, so no need to duplicate code
|
||||
getRPM = getRPM_ThirtySixMinus222;
|
||||
getCrankAngle = getCrankAngle_missingTooth; //This uses the same function as the missing tooth decoder, so no need to duplicate code
|
||||
triggerSetEndTeeth = triggerSetEndTeeth_ThirtySixMinus222;
|
||||
|
||||
|
|
Loading…
Reference in New Issue