SparkMaxPIDController_SetFeedbackDevice

Function SparkMaxPIDController_SetFeedbackDevice 

Source
pub unsafe extern "C" fn SparkMaxPIDController_SetFeedbackDevice(
    this: *mut c_void,
    sensor: *const CANSensor,
) -> REVLibError
Expand description

Set the controller’s feedback device.

The default feedback device is assumed to be the integrated encoder. This is used to changed to another feedback device for the controller, such as an analog sensor.

If there is a limited range on the feedback sensor that should be observed by the PIDController, it can be set by calling SetFeedbackSensorRange() on the sensor object.

@param sensor The sensor to be used as a feedback device

@return REVLibError::kOk if successful