Updated YAGSL SparkMAX handling

This commit is contained in:
thenetworkgrinch
2023-03-21 22:18:24 -05:00
parent 670154f061
commit e8e2edaf5a
110 changed files with 235 additions and 221 deletions

View File

@@ -189,6 +189,12 @@ public class SwerveModule
angle = Math.abs(desiredState.speedMetersPerSecond) <= (configuration.maxSpeed * 0.01) ? lastAngle : angle;
}
// Ensure the angle is above 0
while (angle < 0)
{
angle += 360;
}
// Prevent module rotation if angle is the same as the previous angle.
if (angle != lastAngle || synchronizeEncoderQueued)
{