Skip to content

Commit

Permalink
even more finished
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaldez7206 committed Jan 24, 2024
1 parent f863c7f commit c0b3d5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/frc/lib/util/swerve/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public SwerveModule(int moduleNumber, int driveMotorID, int angleMotorID, int ca
/* Angle Encoder Config */
swerveCANcoderConfig.MagnetSensor.SensorDirection = Constants.Swerve.cancoderInvert;

angleEncoder = new CANcoder(cancoderID, "canivore");
angleEncoder = new CANcoder(cancoderID, Constants.Swerve.canbus);
angleEncoder.getConfigurator().apply(swerveCANcoderConfig);

/* Angle Motor Config */
Expand All @@ -80,7 +80,7 @@ public SwerveModule(int moduleNumber, int driveMotorID, int angleMotorID, int ca
swerveAngleFXConfig.Slot0.kP = Constants.Swerve.angleKP;
swerveAngleFXConfig.Slot0.kI = Constants.Swerve.angleKI;
swerveAngleFXConfig.Slot0.kD = Constants.Swerve.angleKD;
mAngleMotor = new TalonFX(angleMotorID, "canivore");
mAngleMotor = new TalonFX(angleMotorID, Constants.Swerve.canbus);
mAngleMotor.getConfigurator().apply(swerveAngleFXConfig);
resetToAbsolute();

Expand Down Expand Up @@ -115,7 +115,7 @@ public SwerveModule(int moduleNumber, int driveMotorID, int angleMotorID, int ca
Constants.Swerve.closedLoopRamp;
swerveDriveFXConfig.ClosedLoopRamps.VoltageClosedLoopRampPeriod =
Constants.Swerve.closedLoopRamp;
mDriveMotor = new TalonFX(driveMotorID, "canivore");
mDriveMotor = new TalonFX(driveMotorID, Constants.Swerve.canbus);
mDriveMotor.getConfigurator().apply(swerveDriveFXConfig);
mDriveMotor.getConfigurator().setPosition(0.0);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static final class Swerve {
public static final boolean isOpenLoop = false;

/* Drivetrain Constants */
public static final String canbus = "canivore";
public static final double trackWidth = Units.inchesToMeters(22.5);
public static final double wheelBase = Units.inchesToMeters(29.0);
public static final double wheelDiameter = Units.inchesToMeters(4.0);
Expand Down

0 comments on commit c0b3d5a

Please sign in to comment.