SparkMaxRelativeEncoder_SetMeasurementPeriod

Function SparkMaxRelativeEncoder_SetMeasurementPeriod 

Source
pub unsafe extern "C" fn SparkMaxRelativeEncoder_SetMeasurementPeriod(
    this: *mut c_void,
    period_ms: u32,
) -> REVLibError
Expand description

Set the measurement period for velocity measurements of a quadrature encoder. When the SparkMax controller is in Brushless mode, this will not change any behavior.

The basic formula to calculate velocity is change in positon / change in time. This parameter sets the change in time for measurement.

@param period_ms Measurement period in milliseconds. This number may be between 1 and 100 (default).

@return REVLibError::kOk if successful