Skip to content

Commit

Permalink
Fix amount divided by
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueZeeKing committed Jan 2, 2024
1 parent 9b657dd commit 44e0898
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/subsystems/DriveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public void drive(

inputTranslationDir = SwerveUtils.optimizeAngle(inputTranslationDir, currentTranslationDir);

inputTranslationMag *= 1 - Math.abs(inputTranslationDir - currentTranslationDir) / Math.PI;
inputTranslationMag *=
1 - Math.abs(inputTranslationDir - currentTranslationDir) / (Math.PI / 2);

dirLimiter.setRateLimit(
DriveConstants.MAX_DRIVE_ANGULAR_VELOCITY
Expand Down

0 comments on commit 44e0898

Please sign in to comment.