PIDSource¶
-
class
wpilib.interfaces.PIDSource[source]¶ Bases:
objectThis interface allows for
PIDControllerto automatically read from this object.-
class
PIDSourceType[source]¶ Bases:
objectA description for the type of output value to provide to a
PIDController-
kDisplacement= 0¶
-
kRate= 1¶
-
-
static
PIDSource.from_obj_or_callable(objc)[source]¶ Utility method that gets a PIDSource object
Parameters: objc – An object that implements the PIDSource interface, or a callable Returns: an object that implements the PIDSource interface
-
PIDSource.getPIDSourceType()[source]¶ - Get which parameter of the device you are using as a process control
- variable.
Returns: the currently selected PID source parameter
-
PIDSource.pidGet()[source]¶ Get the result to use in
PIDControllerReturns: the result to use in PIDController
-
PIDSource.setPIDSourceType(pidSource)[source]¶ Set which parameter of the device you are using as a process control variable.
Parameters: pidSource ( PIDSourceType) – An enum to select the parameter.
-
class