VEX V5 Python API
|
Inherits vex.TriDevice.
Public Member Functions | |
def | __init__ (self, triport_port) |
Use this class when programming with an encoder. More... | |
def | value (self) |
Gets the value of the encoder. More... | |
def | reset_rotation (self) |
Resets the rotation of the encoder to zero. More... | |
def | set_rotation (self, value, rotationUnits=RotationUnits.DEG) |
Sets the rotation of the encoder to a specific value. More... | |
def | rotation (self, rotationUnits=RotationUnits.DEG) |
Gets the roation value of the encoder. More... | |
def | velocity (self, velocityUnits=VelocityUnits.PCT) |
Gets the velocity of the encoder. More... | |
def vex.Encoder.__init__ | ( | self, | |
triport_port | |||
) |
Use this class when programming with an encoder.
def vex.Encoder.value | ( | self | ) |
Gets the value of the encoder.
def vex.Encoder.reset_rotation | ( | self | ) |
Resets the rotation of the encoder to zero.
def vex.Encoder.set_rotation | ( | self, | |
value, | |||
rotationUnits = RotationUnits.DEG |
|||
) |
Sets the rotation of the encoder to a specific value.
value | A double that represents the value to set the rotation to. |
rotationUnits | The unit type that the previous value should be treated as. |
def vex.Encoder.rotation | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the roation value of the encoder.
rotationUnits | A unit type that defines what value of roation that should be returned. |
def vex.Encoder.velocity | ( | self, | |
velocityUnits = VelocityUnits.PCT |
|||
) |
Gets the velocity of the encoder.
velocityUnits | A unit type that defines what value of velocity that should be returned. |