|
| 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) |
|
◆ SwerveModule()
org.titaniumtitans.frc2022.subsystems.SwerveModule.SwerveModule |
( |
int |
driveMotorChannel, |
|
|
int |
turningMotorChannel, |
|
|
int |
turningEncoderChannels, |
|
|
double |
encoderOffset, |
|
|
String |
name |
|
) |
| |
Constructs a SwerveModule.
- Parameters
-
driveMotorChannel | The channel of the drive motor. |
turningMotorChannel | The channel of the turning motor. |
driveEncoderChannels | The channels of the drive encoder. |
turningEncoderChannels | The channels of the turning encoder. |
driveEncoderReversed | Whether the drive encoder is reversed. |
turningEncoderReversed | Whether the turning encoder is reversed. |
◆ 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 |
( |
| ) |
|
◆ setDesiredState()
void org.titaniumtitans.frc2022.subsystems.SwerveModule.setDesiredState |
( |
SwerveModuleState |
desiredState | ) |
|
Sets the desired state for the module.
- Parameters
-
desiredState | Desired state with speed and angle. |
The documentation for this class was generated from the following file:
- src/main/java/org/titaniumtitans/frc2022/subsystems/SwerveModule.java