|
VEX IQ Python API
|
Public Member Functions | |
| def | __init__ (self, index, calibrate=True) |
| def | start_calibration (self, gyroCalibrationType=GyroCalibrationType.QUICK, waitForCompletion=True) |
| Starts recalibration of the gyro. More... | |
| def | is_calibrating (self) |
| Returns True while the gyro sensor is performing a requested recalibration, changing to false once recalibration has completed. More... | |
| def | set_heading (self, value=0, rotationUnits=RotationUnits.DEG) |
| Set the gyro sensor angle to angle. More... | |
| def | set_rotation (self, value=0, rotationUnits=RotationUnits.DEG) |
| Set the gyro sensor rotation to angle. More... | |
| def | heading (self, rotationUnits=RotationUnits.DEG) |
| Gets the angle of the gyro sensor. More... | |
| def | rotation (self, rotationUnits=RotationUnits.DEG) |
| Gets the absolute angle of the gyro sensor. More... | |
@brief Creates a new gyro object on the port specified in the parameter. @param index to the brain port. @param calibrate set to calibrate the sensor now
| def vex.Gyro.__init__ | ( | self, | |
| index, | |||
calibrate = True |
|||
| ) |
| def vex.Gyro.start_calibration | ( | self, | |
gyroCalibrationType = GyroCalibrationType.QUICK, |
|||
waitForCompletion = True |
|||
| ) |
Starts recalibration of the gyro.
| gyroCalibrationType | amount of time for calibration, GyroCalibrationType enum value. |
| waitForCompletion | wait for calibration to complete |
| def vex.Gyro.is_calibrating | ( | self | ) |
Returns True while the gyro sensor is performing a requested recalibration, changing to false once recalibration has completed.
| def vex.Gyro.set_heading | ( | self, | |
value = 0, |
|||
rotationUnits = RotationUnits.DEG |
|||
| ) |
Set the gyro sensor angle to angle.
| value | The new heading for the gyro |
| rotationUnits | The rotation unit for the heading |
| def vex.Gyro.set_rotation | ( | self, | |
value = 0, |
|||
rotationUnits = RotationUnits.DEG |
|||
| ) |
Set the gyro sensor rotation to angle.
| value | The new absolute angle for the gyro |
| rotationUnits | The rotation unit for the angle |
| def vex.Gyro.heading | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
| ) |
Gets the angle of the gyro sensor.
| rotationUnits | The measurement unit for the gyro device. |
| def vex.Gyro.rotation | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
| ) |
Gets the absolute angle of the gyro sensor.
| rotationUnits | The measurement unit for the gyro device. |
1.8.15