Package frc.lib.util.swerve
Class SwerveModuleReal
java.lang.Object
frc.lib.util.swerve.SwerveModuleReal
- All Implemented Interfaces:
SwerveModuleIO
Swerve Module with real motors and sensors
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.lib.util.swerve.SwerveModuleIO
SwerveModuleIO.SwerveModuleInputs -
Constructor Summary
ConstructorsConstructorDescriptionSwerveModuleReal(int moduleNumber, int driveMotorID, int angleMotorID, int cancoderID, Rotation2d angleOffset) A real Swerve Module with motors and sensors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAngleMotor(com.ctre.phoenix6.controls.ControlRequest request) voidsetDriveMotor(com.ctre.phoenix6.controls.ControlRequest request) voidsetPositionAngleMotor(double absolutePosition) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface frc.lib.util.swerve.SwerveModuleIO
setAngleSelectedSensorPosition
-
Constructor Details
-
SwerveModuleReal
public SwerveModuleReal(int moduleNumber, int driveMotorID, int angleMotorID, int cancoderID, Rotation2d angleOffset) A real Swerve Module with motors and sensors- Parameters:
moduleNumber- The Module NumberdriveMotorID- The Drive Motor CAN IDangleMotorID- The Angle Motor CAN IDcancoderID- The CANCode CAN IDangleOffset- The Angle Offset inRotation2d
-
-
Method Details
-
setAngleMotor
public void setAngleMotor(com.ctre.phoenix6.controls.ControlRequest request) - Specified by:
setAngleMotorin interfaceSwerveModuleIO
-
setDriveMotor
public void setDriveMotor(com.ctre.phoenix6.controls.ControlRequest request) - Specified by:
setDriveMotorin interfaceSwerveModuleIO
-
updateInputs
- Specified by:
updateInputsin interfaceSwerveModuleIO
-
setPositionAngleMotor
public void setPositionAngleMotor(double absolutePosition) - Specified by:
setPositionAngleMotorin interfaceSwerveModuleIO
-