diff --git a/ardustim/ardustim/ardustim.ino b/ardustim/ardustim/ardustim.ino index 1768ca7..cebb252 100644 --- a/ardustim/ardustim/ardustim.ino +++ b/ardustim/ardustim/ardustim.ino @@ -367,7 +367,7 @@ uint16_t calculateCurrentCrankAngle() if(cycleDuration == 0) { return 0; } uint32_t cycleTime = micros() - cycleStartTime; - if( pgm_read_byte(&Wheels[config.wheel].wheel_degrees) == 720 ) { cycleTime = cycleTime / 2; } + if( Wheels[config.wheel].wheel_degrees == 720 ) { cycleTime = cycleTime * 2; } uint16_t tmpCrankAngle = ((cycleTime * 360U) / cycleDuration); tmpCrankAngle += config.compressionOffset;