SparkMaxPIDController_SetD

Function SparkMaxPIDController_SetD 

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

Set the Derivative Gain constant of the PIDF controller on the SPARK MAX. This uses the Set Parameter API and should be used infrequently. The parameter does not presist unless burnFlash() is called. The recommended method to configure this parameter is use to SPARK MAX GUI to tune and save parameters.

@param gain The derivative gain value, must be positive

@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