Interface XSwerveDriveElectricalContract
public interface XSwerveDriveElectricalContract
This interface defines the base electrical contract
for robots implementing swerve drive.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the steering encoders are ready to be used.getDriveMotor
(SwerveInstance swerveInstance) Returns theDeviceInfo
for the drive motor for the givenSwerveInstance
.getSteeringEncoder
(SwerveInstance swerveInstance) Returns theDeviceInfo
for the steering encoder for the givenSwerveInstance
.getSteeringMotor
(SwerveInstance swerveInstance) Returns theDeviceInfo
for the steering motor for the givenSwerveInstance
.getSwerveModuleOffsetsInInches
(SwerveInstance swerveInstance) Returns the offset from the center of the robot as anXYPair
for the givenSwerveInstance
.boolean
Returns true if the drive is ready to be used.
-
Method Details
-
isDriveReady
boolean isDriveReady()Returns true if the drive is ready to be used.- Returns:
- True if the drive is ready to be used.
-
areCanCodersReady
boolean areCanCodersReady()Returns true if the steering encoders are ready to be used.- Returns:
- True if the steering encoders are ready to be used.
-
getDriveMotor
Returns theDeviceInfo
for the drive motor for the givenSwerveInstance
.- Parameters:
swerveInstance
- The swerve instance.- Returns:
- The
DeviceInfo
for the drive motor for the givenSwerveInstance
.
-
getSteeringMotor
Returns theDeviceInfo
for the steering motor for the givenSwerveInstance
.- Parameters:
swerveInstance
- The swerve instance.- Returns:
- The
DeviceInfo
for the steering motor for the givenSwerveInstance
.
-
getSteeringEncoder
Returns theDeviceInfo
for the steering encoder for the givenSwerveInstance
.- Parameters:
swerveInstance
- The swerve instance.- Returns:
- The
DeviceInfo
for the steering encoder for the givenSwerveInstance
.
-
getSwerveModuleOffsetsInInches
Returns the offset from the center of the robot as anXYPair
for the givenSwerveInstance
.- Parameters:
swerveInstance
- The swerve instance.- Returns:
- The offset from the center of the robot as an
XYPair
for the givenSwerveInstance
, in inches.
-