Skip to content

Commit

Permalink
Add safety to ensure feedforward is never used when forcing module to…
Browse files Browse the repository at this point in the history
… positions.

Signed-off-by: thenetworkgrinch <[email protected]>
  • Loading branch information
thenetworkgrinch committed Mar 29, 2023
1 parent 155476e commit ed14c16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/swervelib/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ public void setDesiredState(SwerveModuleState2 desiredState, boolean isOpenLoop,
{
// Prevents module rotation if speed is less than 1%
SwerveMath.antiJitter(desiredState, lastState, configuration.maxSpeed);
} else
{
desiredState.omegaRadPerSecond = 0;
}

if (SwerveDriveTelemetry.verbosity == TelemetryVerbosity.HIGH)
Expand Down

0 comments on commit ed14c16

Please sign in to comment.