SparkMaxRelativeEncoder_SetInverted

Function SparkMaxRelativeEncoder_SetInverted 

Source
pub unsafe extern "C" fn SparkMaxRelativeEncoder_SetInverted(
    this: *mut c_void,
    inverted: bool,
) -> REVLibError
Expand description

Set the phase of the MotorFeedbackSensor so that it is set to be in phase with the motor itself. This only works for quadrature encoders. This will throw an error if the user tries to set inverted while the SparkMax is Brushless and using the hall effect sensor.

@param inverted The phase of the encoder

@return REVLibError::kOk if successful