2022 Hyperion Rewrite  0.1.0
Java rewrite of the Titanium Titans (FRC Team #4467)'s 2022 robot, Hyperion
org.titaniumtitans.frc2022.subsystems.SwerveModule Class Reference
Inheritance diagram for org.titaniumtitans.frc2022.subsystems.SwerveModule:

Public Member Functions

 SwerveModule (int driveMotorChannel, int turningMotorChannel, int turningEncoderChannels, double encoderOffset, String name)
 
SwerveModuleState getState ()
 
Rotation2d getCancoderCurrentAngle ()
 
Rotation2d getTurningMotorAngle ()
 
SwerveModuleState getDesiredState ()
 
void setDesiredState (SwerveModuleState desiredState)
 
double getDriveMotorPercentage ()
 
double getTurningMotorPercentage ()
 
void resetEncoders ()
 
String getName ()
 
void setAbsoluteValue ()
 
void setModuleAngle (double degrees)
 
void initSendable (SendableBuilder builder)
 

Constructor & Destructor Documentation

◆ SwerveModule()

org.titaniumtitans.frc2022.subsystems.SwerveModule.SwerveModule ( int  driveMotorChannel,
int  turningMotorChannel,
int  turningEncoderChannels,
double  encoderOffset,
String  name 
)

Constructs a SwerveModule.

Parameters
driveMotorChannelThe channel of the drive motor.
turningMotorChannelThe channel of the turning motor.
driveEncoderChannelsThe channels of the drive encoder.
turningEncoderChannelsThe channels of the turning encoder.
driveEncoderReversedWhether the drive encoder is reversed.
turningEncoderReversedWhether the turning encoder is reversed.

Member Function Documentation

◆ getState()

SwerveModuleState org.titaniumtitans.frc2022.subsystems.SwerveModule.getState ( )

Returns the current state of the module.

Returns
The current state of the module.

◆ resetEncoders()

void org.titaniumtitans.frc2022.subsystems.SwerveModule.resetEncoders ( )

Zeroes all the SwerveModule encoders.

◆ setDesiredState()

void org.titaniumtitans.frc2022.subsystems.SwerveModule.setDesiredState ( SwerveModuleState  desiredState)

Sets the desired state for the module.

Parameters
desiredStateDesired state with speed and angle.

The documentation for this class was generated from the following file: