Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
fix(swerve): Run drive motor open loop for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenheroux committed Jan 12, 2024
1 parent 0dc7979 commit fff486f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/swerve/DriveMotorIOTalonFXPID.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void setSetpoint(double velocityMetersPerSecond) {
if (velocityMetersPerSecond == 0.0) {
talonFX.setControl(new CoastOut());
} else {
talonFX.setControl(calculateVelocityVoltage(velocityMetersPerSecond));
talonFX.setControl(new VoltageOut(velocityMetersPerSecond / SwerveConstants.MAXIMUM_SPEED * 12));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/frc/robot/swerve/SwerveFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public static TalonFXConfiguration createSteerMotorConfig() {
* @return a drive motor.
*/
public static DriveMotorIO createDriveMotor(SwerveModuleConfig config) {
//if (Robot.isReal()) return new DriveMotorIOTalonFXPID(config.moduleCAN().drive());
if (Robot.isReal()) return new DriveMotorIOSim();
if (Robot.isReal()) return new DriveMotorIOTalonFXPID(config.moduleCAN().drive());

return new DriveMotorIOSim();
}
Expand Down

0 comments on commit fff486f

Please sign in to comment.