Class ReduxDevices

java.lang.Object
swervelib.parser.deserializer.reflections.ReduxDevices

public class ReduxDevices extends Object
Reflective class for Canandgyro and other devices.
  • Constructor Details

    • ReduxDevices

      public ReduxDevices()
  • Method Details

    • getGyroAngle

      public static Pair<Supplier<Angle>,Object> getGyroAngle(int canid, String canbus, SwerveDriveJson.GyroAxis axis, boolean inverted)
      Get the gyroscope angle supplier and gyroscope object.
      Parameters:
      canid - CAN ID of the gyroscope.
      canbus - CAN bus name of the gyroscope.
      axis - Gyro axis.
      inverted - Inverted gyro readings.
      Returns:
      Pair of Supplier and Object
    • getAbsoluteEncoder

      public static Pair<Supplier<Angle>,Object> getAbsoluteEncoder(int canid, String canbus, boolean inverted)
      Get the Canandmag angle.
      Parameters:
      canid - CAN ID of the encoder.
      canbus - CAN bus name of the encoder.
      inverted - Inverted encoder readings.
      Returns:
      Supplier of Angle and Canandmag