VEX V5 Python API
|
Inherits vex.TriDevice.
Public Member Functions | |
def | __init__ (self, triport_port) |
Use this class when programming with a gyro sensor. More... | |
def | value (self, rotationUnits=RotationUnits.DEG) |
Gets the value of the gyro sensor. More... | |
def | start_calibration (self, value=0) |
Starts recalibration of gyro. More... | |
def | is_calibrating (self) |
Returns recalibration status of gyro. More... | |
def | heading (self, rotationUnits=RotationUnits.DEG) |
Gets the heading (yaw angle as 0-360 deg) of the gyro sensor. More... | |
def | rotation (self, rotationUnits=RotationUnits.DEG) |
Gets the absolute angle (yaw angle without limits) of the gyro sensor. More... | |
def | set_heading (self, value, rotationUnits=RotationUnits.DEG) |
brief Set the gyro sensor heading to a new value More... | |
def | reset_heading (self) |
Reset the gyro sensor angle to 0. More... | |
def | set_rotation (self, value, rotationUnits=RotationUnits.DEG) |
def | reset_rotation (self) |
Reset the gyro sensor rotation to 0. More... | |
def vex.Gyro.__init__ | ( | self, | |
triport_port | |||
) |
Use this class when programming with a gyro sensor.
def vex.Gyro.value | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the value of the gyro sensor.
rotationUnits | The unit type of the value that is returned. |
def vex.Gyro.start_calibration | ( | self, | |
value = 0 |
|||
) |
Starts recalibration of gyro.
Note that the gyro is automatically calibrated when the constructor is called.
value | The level of calibration |
def vex.Gyro.is_calibrating | ( | self | ) |
Returns recalibration status of gyro.
def vex.Gyro.heading | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the heading (yaw angle as 0-360 deg) of the gyro sensor.
rotationUnits | The measurement unit for the inertial sensor. |
def vex.Gyro.rotation | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the absolute angle (yaw angle without limits) of the gyro sensor.
rotationUnits | The measurement unit for the gyro sensor. |
def vex.Gyro.set_heading | ( | self, | |
value, | |||
rotationUnits = RotationUnits.DEG |
|||
) |
brief Set the gyro sensor heading to a new value
value | The new heading for the gyro sensor |
rotationUnits | The rotation unit for the angle |
def vex.Gyro.reset_heading | ( | self | ) |
Reset the gyro sensor angle to 0.
def vex.Gyro.set_rotation | ( | self, | |
value, | |||
rotationUnits = RotationUnits.DEG |
|||
) |
def vex.Gyro.reset_rotation | ( | self | ) |
Reset the gyro sensor rotation to 0.