|
VEX V5 Python API
|
Use the rotation class to control absolute encoder devices. More...
Inherits vex.Device.
Public Member Functions | |
| def | __init__ (self, index, is_reverse=False) |
| Creates a new rotation object on the port specified. More... | |
| def | set_reversed (self, is_reverse) |
| def | angle (self, rotationUnits=RotationUnits.DEG) |
| Gets the angle of the absolute encoder. More... | |
| def | reset_position (self) |
| Resets the value of the absolute encoder to zero. More... | |
| def | set_position (self, value, rotationUnits=RotationUnits.DEG) |
| Sets the value of the absolute encoder to the value specified in the parameter. More... | |
| def | position (self, rotationUnits=RotationUnits.DEG) |
| Gets the current position of the absolute encoder. More... | |
| def | velocity (self, velocityUnits=VelocityUnits.DPS) |
| Gets the current velocity of the absolute encoder. More... | |
| def | type (self) |
| Get the device type. More... | |
| def | installed (self) |
| Gets the status of what is installed. More... | |
| def | value (self) |
Use the rotation class to control absolute encoder devices.
| def vex.Rotation.__init__ | ( | self, | |
| index, | |||
is_reverse = False |
|||
| ) |
Creates a new rotation object on the port specified.
| index | The port index for this sensor. The index is zero based. |
| is_reverse | (optional) If set to true, the encoder counts in reverse. |
| def vex.Rotation.set_reversed | ( | self, | |
| is_reverse | |||
| ) |
| def vex.Rotation.angle | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
| ) |
Gets the angle of the absolute encoder.
| rotationUnits | The measurement unit for the encoder device. |
| def vex.Rotation.reset_position | ( | self | ) |
Resets the value of the absolute encoder to zero.
| def vex.Rotation.set_position | ( | self, | |
| value, | |||
rotationUnits = RotationUnits.DEG |
|||
| ) |
Sets the value of the absolute encoder to the value specified in the parameter.
| value | Sets the current position of the absolute encoder. |
| rotationUnits | the measurement unit for the position value. |
| def vex.Rotation.position | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
| ) |
Gets the current position of the absolute encoder.
| rotationUnits | The measurement unit for the position. |
| def vex.Rotation.velocity | ( | self, | |
velocityUnits = VelocityUnits.DPS |
|||
| ) |
Gets the current velocity of the absolute encoder.
| velocityUnits | The measurement unit for the velocity. |
|
inherited |
Get the device type.
|
inherited |
Gets the status of what is installed.
|
inherited |
1.8.15