Skip to content

Commit

Permalink
Updates offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushSagar16 committed Feb 22, 2024
1 parent afe06ac commit d1013a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/ghrobotics/frc2024/subsystems/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,26 @@ private static class Constants {
kFrontLeftConfig.drive_id = 1;
kFrontLeftConfig.steer_id = 2;
kFrontLeftConfig.cancoder_id = 11;
kFrontLeftConfig.module_offset_deg = -24.69 + 90;
kFrontLeftConfig.module_offset_deg = -8.0;
kFrontLeftConfig.invert = false;

kFrontRightConfig.drive_id = 3;
kFrontRightConfig.steer_id = 4;
kFrontRightConfig.cancoder_id = 12;
kFrontRightConfig.module_offset_deg = 0;
kFrontRightConfig.module_offset_deg = 173.44;
kFrontRightConfig.invert = true;

kBackLeftConfig.drive_id = 5;
kBackLeftConfig.steer_id = 6;
kBackLeftConfig.cancoder_id = 13;
kBackLeftConfig.module_offset_deg = -8 + 180;
kBackLeftConfig.module_offset_deg = 9.14;
kBackLeftConfig.invert = false;
// (228.00 + -46.799534) + 180;

kBackRightConfig.drive_id = 7;
kBackRightConfig.steer_id = 8;
kBackRightConfig.cancoder_id = 14;
kBackRightConfig.module_offset_deg = -14;
kBackRightConfig.module_offset_deg = 60.90;
kBackRightConfig.invert = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public SwerveModule(Configuration configuration) {
// Initialize motor controllers
drive_motor_ = new CANSparkMax(configuration_.drive_id, CANSparkMax.MotorType.kBrushless);
drive_motor_.restoreFactoryDefaults();
drive_motor_.setIdleMode(CANSparkMax.IdleMode.kBrake);
drive_motor_.setIdleMode(CANSparkMax.IdleMode.kCoast);
drive_motor_.setInverted(configuration_.invert);

steer_motor_ = new CANSparkMax(configuration_.steer_id, CANSparkMax.MotorType.kBrushless);
steer_motor_.restoreFactoryDefaults();
steer_motor_.setIdleMode(CANSparkMax.IdleMode.kBrake);
steer_motor_.setIdleMode(CANSparkMax.IdleMode.kCoast);
steer_motor_.setInverted(true);

// Initialize encoders
Expand Down

0 comments on commit d1013a0

Please sign in to comment.