pub unsafe extern "C" fn SparkMaxPIDController_SetReference(
this: *mut SparkMaxPIDController,
value: f64,
ctrl: CANSparkMaxLowLevel_ControlType,
pidSlot: c_int,
arbFeedforward: f64,
arbFFUnits: SparkMaxPIDController_ArbFFUnits,
) -> REVLibErrorExpand description
Set the controller reference value based on the selected control mode.
@param value The value to set depending on the control mode. For basic duty cycle control this should be a value between -1 and 1 Otherwise: Voltage Control: Voltage (volts) Velocity Control: Velocity (RPM) Position Control: Position (Rotations) Current Control: Current (Amps). The units can be changed for position and velocity by a scale factor using setPositionConversionFactor().
@param ctrl Is the control type
@param pidSlot for this command
@param arbFeedforward A value from -32.0 to 32.0 which is a voltage applied to the motor after the result of the specified control mode. The units for the parameter is Volts. This value is set after the control mode, but before any current limits or ramp rates.
@return REVLibError::kOk if successful