Skip to content

Commit

Permalink
Fix swerve module speed deadbanding
Browse files Browse the repository at this point in the history
  • Loading branch information
BenG49 committed Jan 31, 2024
1 parent 672c5b9 commit e0b0d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void periodic() {
Angle.fromRotation2d(getAngle())
);

if (Math.abs(driveController.getOutput()) < Settings.Swerve.MODULE_VELOCITY_DEADBAND.get()) {
if (Math.abs(driveController.getSetpoint()) < Settings.Swerve.MODULE_VELOCITY_DEADBAND.get()) {
driveSim.setInput(0);
turnSim.setInput(0);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void periodic() {
Angle.fromRotation2d(getAngle())
);

if (Math.abs(driveController.getOutput()) < Settings.Swerve.MODULE_VELOCITY_DEADBAND.get()) {
if (Math.abs(driveController.getSetpoint()) < Settings.Swerve.MODULE_VELOCITY_DEADBAND.get()) {
driveMotor.setVoltage(0);
turnMotor.setVoltage(0);
} else {
Expand Down

0 comments on commit e0b0d43

Please sign in to comment.