Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
legoguy1000 committed Jan 14, 2024
1 parent 051e806 commit df82a1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/frc/lib/util/swerve/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void setDesiredState(SwerveModuleState desiredState, boolean isOpenLoop)
double percentOutput = desiredState.speedMetersPerSecond / Constants.Swerve.maxSpeed;
driveMotor.setControl(drivePower.withOutput(percentOutput));
} else {
// See Line 186, swerveDriveFXConfig.Feedback.SensorToMechanismRatio
double velocity = Conversions.mpsToFalconRPS(desiredState.speedMetersPerSecond,
Constants.Swerve.wheelCircumference, 1);
driveMotor.setControl(driveSpeed.withVelocity(velocity));
Expand Down

0 comments on commit df82a1e

Please sign in to comment.