SparkMaxPIDController_SetSmartMotionAllowedClosedLoopError

Function SparkMaxPIDController_SetSmartMotionAllowedClosedLoopError 

Source
pub unsafe extern "C" fn SparkMaxPIDController_SetSmartMotionAllowedClosedLoopError(
    this: *mut c_void,
    allowedErr: f64,
    slotID: c_int,
) -> REVLibError
Expand description

Configure the allowed closed loop error of SmartMotion mode. This value is how much deviation from your setpoint is tolerated and is useful in preventing oscillation around your setpoint.

@param allowedErr The allowed deviation for your setpoint vs actual position in rotations

@param slotID Is the gain schedule slot, the value is a number between 0 and 3. Each slot has its own set of gain values and can be changed in each control frame using SetReference().

@return REVLibError::kOk if successful