Skip to content

Commit

Permalink
fixed swerve offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBrar committed Dec 15, 2024
1 parent da050b9 commit 35bbac2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/include/SwerveConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// --------------------Absolute Encoder-----------------------
const int FL_ABS_ENC_PORT = 6;
const bool FL_ABS_ENC_INVERTED = false;
const frc::Rotation2d FL_ZERO_HEADING{units::degree_t{301.6f}};
const frc::Rotation2d FL_ZERO_HEADING{units::degree_t{0.582031f*360.0f}};

ctre::phoenix6::hardware::CANcoder fl_abs_enc{FL_ABS_ENC_PORT};

Expand All @@ -39,7 +39,7 @@ rev::SparkPIDController fl_drive_pid = fl_drive_mtr.GetPIDController();
// --------------------Absolute Encoder-----------------------
const int FR_ABS_ENC_PORT = 12;
const bool FR_ABS_ENC_INVERTED = false;
const frc::Rotation2d FR_ZERO_HEADING{units::degree_t{92.94f}};
const frc::Rotation2d FR_ZERO_HEADING{units::degree_t{-0.355469f*360.0f}};

ctre::phoenix6::hardware::CANcoder fr_abs_enc{FR_ABS_ENC_PORT};

Expand All @@ -66,7 +66,7 @@ rev::SparkPIDController fr_drive_pid = fr_drive_mtr.GetPIDController();
// --------------------Absolute Encoder-----------------------
const int BL_ABS_ENC_PORT = 3;
const bool BL_ABS_ENC_INVERTED = false;
const frc::Rotation2d BL_ZERO_HEADING{units::degree_t{221.6f}};
const frc::Rotation2d BL_ZERO_HEADING{units::degree_t{0.864990f*360.0f}};

ctre::phoenix6::hardware::CANcoder bl_abs_enc{BL_ABS_ENC_PORT};

Expand Down Expand Up @@ -94,7 +94,7 @@ rev::SparkPIDController bl_drive_pid = bl_drive_mtr.GetPIDController();
// --------------------Absolute Encoder-----------------------
const int BR_ABS_ENC_PORT = 9;
const bool BR_ABS_ENC_INVERTED = false;
const frc::Rotation2d BR_ZERO_HEADING{units::degree_t{345.0f}};
const frc::Rotation2d BR_ZERO_HEADING{units::degree_t{0.306152f*360.0f}};

ctre::phoenix6::hardware::CANcoder br_abs_enc{BR_ABS_ENC_PORT};

Expand Down

0 comments on commit 35bbac2

Please sign in to comment.