SwerveModule

public class SwerveModule

Represents a swerve module used in a swerve drive system.

Constructors

Link copied to clipboard
public void SwerveModule(int driveId, int steerId, int canCoderID, double canCoderDriveStraightSteerSetPoint)
Constructs a new SwerveModule.

Properties

Link copied to clipboard
public SwerveModuleState state

Functions

Link copied to clipboard
public void applyTelePIDValues()
Link copied to clipboard
public SwerveModulePosition getPosition()
Gets the current position of the swerve module.
Link copied to clipboard
public SwerveModuleState getState()
Gets the current state of the swerve module.
Link copied to clipboard
Link copied to clipboard
public void intializeAlarms(int driveID, int steerID, int canCoderID)
Link copied to clipboard
public void resetDrivePosition()
Resets the drive motor position to zero.
Link copied to clipboard
public void setAutoPID()
Sets the PID values for autonomous mode.
Link copied to clipboard
public void setDrivePID(PIDController pid, double velocity)
Sets the drive PID values.
Link copied to clipboard
public void setState(SwerveModuleState desiredState)
Sets the state of the swerve module.
Link copied to clipboard
public void setSteerPID(PIDController pid, double velocity)
Sets the steer PID values.
Link copied to clipboard
public void setTelePID()
Sets the PID values for teleoperation mode.
Link copied to clipboard
public void stop()
Stops the swerve module motors.
Link copied to clipboard
public void updateTelePID()