From fde322f8f5641439da5034ecc13d5af370b4f7bb Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Thu, 27 Jul 2017 15:25:57 +1000 Subject: [PATCH] Fix for rare RPM error when cranking using missing tooth wheel --- speeduino/decoders.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speeduino/decoders.ino b/speeduino/decoders.ino index 68132619..ad683954 100644 --- a/speeduino/decoders.ino +++ b/speeduino/decoders.ino @@ -192,7 +192,7 @@ void triggerSec_missingTooth() uint16_t getRPM_missingTooth() { uint16_t tempRPM = 0; - if( currentStatus.RPM < (unsigned int)(configPage2.crankRPM * 100) ) + if( (currentStatus.RPM < (unsigned int)(configPage2.crankRPM * 100)) && (toothCurrentCount != 1) ) //Can't do per tooth RPM if we're at tooth #1 as the missing tooth messes the calculation { if(configPage2.TrigSpeed == 1) { crankingGetRPM(configPage2.triggerTeeth/2); } //Account for cam speed else { tempRPM = crankingGetRPM(configPage2.triggerTeeth); }