Skip to content

Commit

Permalink
Added back anti-jitter.
Browse files Browse the repository at this point in the history
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
  • Loading branch information
thenetworkgrinch committed Jan 26, 2024
1 parent 8f0ed77 commit 1714e62
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/swervelib/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,12 @@ public void setDesiredState(SwerveModuleState desiredState, boolean isOpenLoop,
driveMotor.setReference(velocity, feedforward.calculate(velocity));
}

/* // Not necessary anymore.
// If we are forcing the angle
if (!force)
{
// Prevents module rotation if speed is less than 1%
SwerveMath.antiJitter(desiredState, lastState, Math.min(maxSpeed, 4));
}
*/

// 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.
Expand Down

0 comments on commit 1714e62

Please sign in to comment.