Fix rare potential overflow that cause lead to false positive noise filter on crank signal

This commit is contained in:
Josh Stewart 2015-12-09 13:33:35 +11:00
parent 2bdfedd813
commit ce365c5bd5
1 changed files with 4 additions and 4 deletions

View File

@ -1,11 +1,11 @@
#include <limits.h>
volatile unsigned long curTime;
volatile unsigned int curGap;
volatile unsigned long curGap;
volatile unsigned long curTime2;
volatile unsigned int curGap2;
volatile unsigned int lastGap;
volatile unsigned int targetGap;
volatile unsigned long curGap2;
volatile unsigned long lastGap;
volatile unsigned long targetGap;
volatile int toothCurrentCount = 0; //The current number of teeth (Onec sync has been achieved, this can never actually be 0
volatile unsigned long toothLastToothTime = 0; //The time (micros()) that the last tooth was registered