Interface XSwerveDriveElectricalContract


public interface XSwerveDriveElectricalContract
This interface defines the base electrical contract for robots implementing swerve drive.
  • 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

      CANMotorControllerInfo getDriveMotor(SwerveInstance swerveInstance)
      Returns the DeviceInfo for the drive motor for the given SwerveInstance.
      Parameters:
      swerveInstance - The swerve instance.
      Returns:
      The DeviceInfo for the drive motor for the given SwerveInstance.
    • getSteeringMotor

      CANMotorControllerInfo getSteeringMotor(SwerveInstance swerveInstance)
      Returns the DeviceInfo for the steering motor for the given SwerveInstance.
      Parameters:
      swerveInstance - The swerve instance.
      Returns:
      The DeviceInfo for the steering motor for the given SwerveInstance.
    • getSteeringEncoder

      DeviceInfo getSteeringEncoder(SwerveInstance swerveInstance)
      Returns the DeviceInfo for the steering encoder for the given SwerveInstance.
      Parameters:
      swerveInstance - The swerve instance.
      Returns:
      The DeviceInfo for the steering encoder for the given SwerveInstance.
    • getSwerveModuleOffsetsInInches

      XYPair getSwerveModuleOffsetsInInches(SwerveInstance swerveInstance)
      Returns the offset from the center of the robot as an XYPair for the given SwerveInstance.
      Parameters:
      swerveInstance - The swerve instance.
      Returns:
      The offset from the center of the robot as an XYPair for the given SwerveInstance, in inches.