REVLib - C++
rev::CANSensor Class Referenceabstract

#include <CANSensor.h>

Inherited by rev::MotorFeedbackSensor.

Public Member Functions

virtual ~CANSensor ()
 
virtual REVLibError SetInverted (bool inverted)=0
 
virtual bool GetInverted () const =0
 

Friends

class MotorFeedbackSensor
 
class SparkMaxPIDController
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CANSensor()

virtual rev::CANSensor::~CANSensor ( )
inlinevirtual

Member Function Documentation

◆ SetInverted()

virtual REVLibError rev::CANSensor::SetInverted ( bool  inverted)
pure virtual

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.

Implemented in rev::SparkMaxAlternateEncoder, rev::SparkMaxAnalogSensor, rev::SparkMaxRelativeEncoder, rev::CANAnalog, rev::CANEncoder, rev::MotorFeedbackSensor, and rev::RelativeEncoder.

◆ GetInverted()

virtual bool rev::CANSensor::GetInverted ( ) const
pure virtual

Get the phase of the CANSensor. This will just return false if the user tries to get the inversion of the hall effect.

Implemented in rev::SparkMaxAlternateEncoder, rev::SparkMaxAnalogSensor, rev::SparkMaxRelativeEncoder, rev::CANAnalog, rev::CANEncoder, rev::MotorFeedbackSensor, and rev::RelativeEncoder.

Friends And Related Function Documentation

◆ MotorFeedbackSensor

friend class MotorFeedbackSensor
friend

◆ SparkMaxPIDController

friend class SparkMaxPIDController
friend

The documentation for this class was generated from the following file: