Skip to content

Commit

Permalink
Change all CANSparkMax to wrapped versions
Browse files Browse the repository at this point in the history
Co-Authored-By: Kaya <[email protected]>
  • Loading branch information
MEFThunders7035 and kytpbs committed Feb 26, 2024
1 parent 6525142 commit c878eab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/frc/robot/subsystems/MAXSwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
import edu.wpi.first.math.kinematics.SwerveModulePosition;
import edu.wpi.first.math.kinematics.SwerveModuleState;
import frc.robot.Constants.ModuleConstants;
import frc.utils.sim_utils.CANSparkMAXWrapped;

public class MAXSwerveModule {
private final CANSparkMax m_drivingSparkMax;
private final CANSparkMax m_turningSparkMax;
private final CANSparkMAXWrapped m_drivingSparkMax;
private final CANSparkMAXWrapped m_turningSparkMax;

private final RelativeEncoder m_drivingEncoder;
private final AbsoluteEncoder m_turningEncoder;
Expand All @@ -30,8 +31,8 @@ public class MAXSwerveModule {
* MAX, and a Through Bore Encoder.
*/
public MAXSwerveModule(int drivingCANId, int turningCANId, double chassisAngularOffset) {
m_drivingSparkMax = new CANSparkMax(drivingCANId, MotorType.kBrushless);
m_turningSparkMax = new CANSparkMax(turningCANId, MotorType.kBrushless);
m_drivingSparkMax = new CANSparkMAXWrapped(drivingCANId, MotorType.kBrushless);
m_turningSparkMax = new CANSparkMAXWrapped(turningCANId, MotorType.kBrushless);

// Factory reset, so we get the SPARKS MAX to a known state before configuring
// them. This is useful in case a SPARK MAX is swapped out.
Expand Down

0 comments on commit c878eab

Please sign in to comment.