Added back anti-jitter

This commit is contained in:
thenetworkgrinch
2024-01-26 11:58:41 -06:00
parent 75ec1aee24
commit 053ae733cd

View File

@@ -226,14 +226,12 @@ public class SwerveModule
driveMotor.setReference(velocity, feedforward.calculate(velocity)); driveMotor.setReference(velocity, feedforward.calculate(velocity));
} }
/* // Not necessary anymore.
// If we are forcing the angle // If we are forcing the angle
if (!force) if (!force)
{ {
// Prevents module rotation if speed is less than 1% // Prevents module rotation if speed is less than 1%
SwerveMath.antiJitter(desiredState, lastState, Math.min(maxSpeed, 4)); SwerveMath.antiJitter(desiredState, lastState, Math.min(maxSpeed, 4));
} }
*/
// Prevent module rotation if angle is the same as the previous angle. // Prevent module rotation if angle is the same as the previous angle.
// Synchronize encoders if queued and send in the current position as the value from the absolute encoder. // Synchronize encoders if queued and send in the current position as the value from the absolute encoder.