Skip to content

Commit

Permalink
Merge branch 'unit_tests' of https://github.com/team20/TestingBot int…
Browse files Browse the repository at this point in the history
…o unit_tests
  • Loading branch information
jhhbrown1 committed Jan 25, 2025
2 parents e03cfaa + 24c7c5f commit 426c224
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/subsystems/DriveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ private SwerveModuleState[] calculateModuleStates(ChassisSpeeds speeds, boolean
if (isFieldRelative) {
speeds = ChassisSpeeds.fromFieldRelativeSpeeds(speeds, getHeading());
}
// speeds --> target module states
SwerveModuleState[] states = m_kinematics.toSwerveModuleStates(speeds);
// normalization
SwerveDriveKinematics.desaturateWheelSpeeds(states, kTeleopMaxVoltage);
// Get the current module angles
double[] moduleAngles = { m_frontLeft.getModuleAngle(), m_frontRight.getModuleAngle(),
Expand Down

0 comments on commit 426c224

Please sign in to comment.