Class XRPMotor
java.lang.Object
org.wpilib.xrp.XRPMotor
- All Implemented Interfaces:
MotorController
XRPMotor.
A SimDevice based motor controller representing the motors on an XRP robot
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()Disables the motor controller.doubleGets the duty cycle of the motor controller.booleanGets the inversion state of the motor controller.voidsetDutyCycle(double velocity) Sets the duty cycle of the motor controller.voidsetInverted(boolean isInverted) Sets the inversion state of the motor controller.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MotorController
setVoltage, setVoltage
-
Constructor Details
-
XRPMotor
-
-
Method Details
-
setDutyCycle
Description copied from interface:MotorControllerSets the duty cycle of the motor controller.- Specified by:
setDutyCyclein interfaceMotorController- Parameters:
velocity- The duty cycle between -1 and 1 (sign indicates direction).
-
getDutyCycle
Description copied from interface:MotorControllerGets the duty cycle of the motor controller.- Specified by:
getDutyCyclein interfaceMotorController- Returns:
- The duty cycle between -1 and 1 (sign indicates direction).
-
setInverted
Description copied from interface:MotorControllerSets the inversion state of the motor controller.- Specified by:
setInvertedin interfaceMotorController- Parameters:
isInverted- The inversion state.
-
getInverted
Description copied from interface:MotorControllerGets the inversion state of the motor controller.- Specified by:
getInvertedin interfaceMotorController- Returns:
- The inversion state.
-
disable
Description copied from interface:MotorControllerDisables the motor controller.- Specified by:
disablein interfaceMotorController
-