Class ThriftyBotDevices
java.lang.Object
swervelib.parser.deserializer.reflections.ThriftyBotDevices
Reflection class for
SmartMotorControllers and other devices from ThriftyBot.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAbsolute encoder types.static enumMotor controller types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAbsoluteEncoder(int canid, String canbus, boolean inverted) Get theThriftyEncoderangle.getAttachedAbsoluteEncoder(String attachType, Object motorController, boolean inverted) Get the attached absolute encoder.static yams.motorcontrollers.SmartMotorControllergetMotorController(int canid, String canbus, yams.motorcontrollers.SmartMotorControllerConfig config, DCMotor motor, String motorControllerType) Get theThriftyNovaas aSmartMotorController.
-
Constructor Details
-
ThriftyBotDevices
public ThriftyBotDevices()
-
-
Method Details
-
getMotorController
public static yams.motorcontrollers.SmartMotorController getMotorController(int canid, String canbus, yams.motorcontrollers.SmartMotorControllerConfig config, DCMotor motor, String motorControllerType) Get theThriftyNovaas aSmartMotorController.- Parameters:
canid- CAN ID of theThriftyNovacanbus- CAN bus name of theThriftyNovaconfig-SmartMotorControllerConfigto apply to theSmartMotorControllermotor-DCMotorto use with theSmartMotorControllermotorControllerType- Motor controller type.- Returns:
SmartMotorController
-
getAbsoluteEncoder
public static Pair<Supplier<Angle>,Object> getAbsoluteEncoder(int canid, String canbus, boolean inverted) Get theThriftyEncoderangle. -
getAttachedAbsoluteEncoder
public static Pair<Supplier<Angle>,Object> getAttachedAbsoluteEncoder(String attachType, Object motorController, boolean inverted) Get the attached absolute encoder.
-