Fix for potential timing issue running dual wheel, sequential at cam speed

This commit is contained in:
Josh Stewart 2023-02-28 15:02:07 +11:00
parent f95b4978cd
commit 560764e50b
1 changed files with 1 additions and 1 deletions

View File

@ -830,7 +830,7 @@ int getCrankAngle_DualWheel(void)
crankAngle += timeToAngle(elapsedTime, CRANKMATH_METHOD_INTERVAL_REV);
//Sequential check (simply sets whether we're on the first or 2nd revolution of the cycle)
if (tempRevolutionOne) { crankAngle += 360; }
if ( (tempRevolutionOne == true) && (configPage4.TrigSpeed == CRANK_SPEED) ) { crankAngle += 360; }
if (crankAngle >= 720) { crankAngle -= 720; }
if (crankAngle > CRANK_ANGLE_MAX) { crankAngle -= CRANK_ANGLE_MAX; }