Fix initial state of the dual wheel decoder on first rev after sync

This commit is contained in:
Josh Stewart 2018-02-05 18:05:58 +11:00
parent 0c374cf081
commit 11a0c8069e
1 changed files with 2 additions and 1 deletions

View File

@ -377,7 +377,8 @@ void triggerSec_DualWheel()
{
toothLastToothTime = micros();
//CONFIRM THE BELOW! IT DOESN'T LOOK RIGHT (toothOneTime??)
toothLastMinusOneToothTime = (toothOneTime - 6000000) / configPage4.triggerTeeth; //Fixes RPM at 10rpm until a full revolution has taken place
//toothLastMinusOneToothTime = (toothOneTime - 6000000) / configPage4.triggerTeeth; //Fixes RPM at 10rpm until a full revolution has taken place
toothLastMinusOneToothTime = micros() - (6000000 / configPage4.triggerTeeth); //Fixes RPM at 10rpm until a full revolution has taken place
toothCurrentCount = configPage4.triggerTeeth;
currentStatus.hasSync = true;