Skip to content

Commit a62be8b

Browse files
committed
moved back drive/turnMotorType
1 parent d2a0df1 commit a62be8b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/org/carlmontrobotics/lib199/swerve/SwerveModule.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,18 @@ public enum ModuleType {FL, FR, BL, BR};
7171
private double turnSpeedCorrectionVolts, turnFFVolts, turnVolts;
7272
private double maxTurnVelocityWithoutTippingRps;
7373

74+
MotorControllerType driveMotorType;
75+
MotorControllerType turnMotorType;
76+
7477
SparkBaseConfigAccessor driveConfigAccessor;
7578
SparkBaseConfigAccessor turnConfigAccessor;
7679

7780
public SwerveModule(SwerveConfig config, ModuleType type, SparkBase drive, SparkBase turn, CANcoder turnEncoder,
7881
int arrIndex, Supplier<Float> pitchDegSupplier, Supplier<Float> rollDegSupplier) {
79-
driveConfig = MotorControllerType.getMotorControllerType(drive).createConfig();
80-
turnConfig = MotorControllerType.getMotorControllerType(turn).createConfig();
82+
driveMotorType = MotorControllerType.getMotorControllerType(drive);
83+
turnMotorType = MotorControllerType.getMotorControllerType(turn);
84+
driveConfig = driveMotorType.createConfig();
85+
turnConfig = turnMotorType.createConfig();
8186
driveConfigAccessor = MotorControllerFactory.getConfigAccessor(drive);
8287
turnConfigAccessor = MotorControllerFactory.getConfigAccessor(turn);
8388
//SmartDashboard.putNumber("Target Angle (deg)", 0.0);

0 commit comments

Comments
 (0)