Interface CANSensor

All Known Subinterfaces:
CANAnalog, CANEncoder, MotorFeedbackSensor, RelativeEncoder
All Known Implementing Classes:
SparkMaxAlternateEncoder, SparkMaxAnalogSensor, SparkMaxRelativeEncoder

@Deprecated(forRemoval=true) public interface CANSensor
Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the phase of the CANSensor.
    setInverted(boolean inverted)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the phase of the CANSensor so that it is set to be in phase with the motor itself.
  • Method Details

    • setInverted

      REVLibError setInverted(boolean inverted)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the phase of the CANSensor so that it is set to be in phase with the motor itself. This only works for quadrature encoders and analog sensors. This will throw an error if the user tries to set the inversion of the hall effect.
      Parameters:
      inverted - The phase of the sensor
      Returns:
      REVLibError.kOk if successful
    • getInverted

      boolean getInverted()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the phase of the CANSensor. This will just return false if the user tries to get the inversion of the hall effect.
      Returns:
      The phase of the sensor