SparkMaxPIDController_SetSmartMotionMaxVelocity

Function SparkMaxPIDController_SetSmartMotionMaxVelocity 

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

Configure the maximum velocity of the SmartMotion mode. This is the velocity that is reached in the middle of the profile and is what the motor should spend most of its time at

@param maxVel The maxmimum cruise velocity for the motion profile in RPM

@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