GyroBase¶
-
class
wpilib.
GyroBase
[source]¶ Bases:
wpilib.SensorBase
GyroBase is the common base class for Gyro implementations such as
AnalogGyro
.-
class
PIDSourceType
¶ Bases:
object
A description for the type of output value to provide to a
PIDController
-
kDisplacement
= 0¶
-
kRate
= 1¶
-
-
pidGet
()[source]¶ Get the output of the gyro for use with PIDControllers. May be the angle or rate depending on the set
PIDSourceType
Returns: the current angle according to the gyro Return type: float
-
setPIDSourceType
(pidSource)[source]¶ Set which parameter of the gyro you are using as a process control variable. The Gyro class supports the rate and angle parameters.
Parameters: pidSource ( PIDSource.PIDSourceType
) – An enum to select the parameter.
-
class