Package com.frcteam364
Class CTREModuleState
- java.lang.Object
-
- com.frcteam364.CTREModuleState
-
public class CTREModuleState extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CTREModuleState()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static edu.wpi.first.math.kinematics.SwerveModuleState
optimize(edu.wpi.first.math.kinematics.SwerveModuleState desiredState, edu.wpi.first.math.geometry.Rotation2d currentAngle)
Minimize the change in heading the desired swerve module state would require by potentially reversing the direction the wheel spins.
-
-
-
Method Detail
-
optimize
public static edu.wpi.first.math.kinematics.SwerveModuleState optimize(edu.wpi.first.math.kinematics.SwerveModuleState desiredState, edu.wpi.first.math.geometry.Rotation2d currentAngle)
Minimize the change in heading the desired swerve module state would require by potentially reversing the direction the wheel spins. Customized from WPILib's version to include placing in appropriate scope for CTRE onboard control.- Parameters:
desiredState
- The desired state.currentAngle
- The current module angle.
-
-