Class CTREDevices
java.lang.Object
swervelib.parser.deserializer.reflections.CTREDevices
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumMotor controller types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAbsoluteEncoder(int canid, String canbus, boolean inverted) Get theCANcoderangle.getGyroAngle(int canid, String canbus, SwerveDriveJson.GyroAxis axis, boolean inverted) Get the gyroscope angle supplier and gyroscope object.static yams.motorcontrollers.SmartMotorControllergetMotorController(int canid, String canbus, yams.motorcontrollers.SmartMotorControllerConfig config, DCMotor motor, String motorControllerType) Get theCTREDevices.MotorControllerTypeas aSmartMotorController.
-
Constructor Details
-
CTREDevices
public CTREDevices()
-
-
Method Details
-
getMotorController
public static yams.motorcontrollers.SmartMotorController getMotorController(int canid, String canbus, yams.motorcontrollers.SmartMotorControllerConfig config, DCMotor motor, String motorControllerType) Get theCTREDevices.MotorControllerTypeas aSmartMotorController.- Parameters:
canid- CAN ID of theCTREDevices.MotorControllerTypecanbus- CAN bus name of theCTREDevices.MotorControllerTypeconfig-SmartMotorControllerConfigto apply to theSmartMotorControllermotor-DCMotorto use with theSmartMotorControllermotorControllerType- Motor controller type.- Returns:
SmartMotorController
-
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. -
getAbsoluteEncoder
public static Pair<Supplier<Angle>,Object> getAbsoluteEncoder(int canid, String canbus, boolean inverted) Get theCANcoderangle.
-