VEX V5 Python API
|
Inherits vex.Device.
Public Member Functions | |
def | __init__ (self, triport_port, reverse=False) |
Use this class when programming with a motor connected to a victor motor controller. More... | |
def | set_velocity (self, velocity, percentUnits=PercentUnits.PCT) |
Sets the velocity of the motor based on the parameters set in the command. More... | |
def | set_reversed (self, is_reversed) |
Use this function to reverse setting for the motor. More... | |
def | spin (self, direction, velocity=None, velocityUnits=VelocityUnits.PCT) |
Turns on the motor and spins it in a specified direction and a specified velocity. More... | |
def | stop (self) |
Stops the motor using the default brake mode. More... | |
def | type (self) |
Get the device type. More... | |
def | installed (self) |
Gets the status of what is installed. More... | |
def | value (self) |
def vex.MotorVictor.__init__ | ( | self, | |
triport_port, | |||
reverse = False |
|||
) |
Use this class when programming with a motor connected to a victor motor controller.
def vex.MotorVictor.set_velocity | ( | self, | |
velocity, | |||
percentUnits = PercentUnits.PCT |
|||
) |
Sets the velocity of the motor based on the parameters set in the command.
This command will not run the motor. Any subsequent call that does not contain a specified motor velocity will use this value.
velocity | Set the amount of velocity that the motor should use. |
percentUnits | Set what the motor should treat the previous velocity value as. |
def vex.MotorVictor.set_reversed | ( | self, | |
is_reversed | |||
) |
Use this function to reverse setting for the motor.
is_reversed | If set to true, the motor will spin in the reversed direction. |
def vex.MotorVictor.spin | ( | self, | |
direction, | |||
velocity = None , |
|||
velocityUnits = VelocityUnits.PCT |
|||
) |
Turns on the motor and spins it in a specified direction and a specified velocity.
direction | Spin the motor forward by passing FWD, or spin the motor backward by passing REV. |
velocity | Set the amount of velocity that the motor should use. |
velocityUnits | Set what the motor should treat the previous velocity value as. |
def vex.MotorVictor.stop | ( | self | ) |
Stops the motor using the default brake mode.
|
inherited |
Get the device type.
|
inherited |
Gets the status of what is installed.
|
inherited |