Package frc.lib.util.swerve
Class SwerveModuleReal
java.lang.Object
frc.lib.util.swerve.SwerveModuleReal
- All Implemented Interfaces:
SwerveModuleIO
Swerve Module IO
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.lib.util.swerve.SwerveModuleIO
SwerveModuleIO.SwerveModuleInputs -
Constructor Summary
ConstructorsConstructorDescriptionSwerveModuleReal(int driveMotorID, int angleMotorID, int cancoderID, Rotation2d cancoderOffset) Instantiating motors and Encoders -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAngleMotor(double angle) voidsetDriveMotor(double mps) 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, setDriveMotorPower, setModNumber
-
Constructor Details
-
SwerveModuleReal
public SwerveModuleReal(int driveMotorID, int angleMotorID, int cancoderID, Rotation2d cancoderOffset) Instantiating motors and Encoders
-
-
Method Details
-
setAngleMotor
public void setAngleMotor(double angle) - Specified by:
setAngleMotorin interfaceSwerveModuleIO
-
setDriveMotor
public void setDriveMotor(double mps) - Specified by:
setDriveMotorin interfaceSwerveModuleIO
-
updateInputs
- Specified by:
updateInputsin interfaceSwerveModuleIO
-
setPositionAngleMotor
public void setPositionAngleMotor(double absolutePosition) - Specified by:
setPositionAngleMotorin interfaceSwerveModuleIO
-