Class CANCoderSwerve

All Implemented Interfaces:
AutoCloseable

public class CANCoderSwerve extends SwerveAbsoluteEncoder
Swerve Absolute Encoder for CTRE CANCoders.
  • Field Details

    • STATUS_TIMEOUT_SECONDS

      public static double STATUS_TIMEOUT_SECONDS
      Wait time for status frames to show up.
    • encoder

      public CANcoder encoder
      CANCoder with WPILib sendable and support.
  • Constructor Details

    • CANCoderSwerve

      public CANCoderSwerve(int id)
      Initialize the CANCoder on the standard CANBus.
      Parameters:
      id - CAN ID.
    • CANCoderSwerve

      public CANCoderSwerve(int id, String canbus)
      Initialize the CANCoder on the CANivore.
      Parameters:
      id - CAN ID of the CANcoder.
      canbus - CAN bus to initialize it on. Should be "rio" or "" if the RIO CANbus, else is the CANivore name.
  • Method Details