REVLib - C++
rev::spark::SparkAbsoluteEncoder Class Reference

#include <SparkAbsoluteEncoder.h>

Inherits rev::AbsoluteEncoder.

Public Member Functions

 SparkAbsoluteEncoder (SparkAbsoluteEncoder &&rhs)=default
 
SparkAbsoluteEncoderoperator= (SparkAbsoluteEncoder &&rhs)=default
 
 SparkAbsoluteEncoder (const SparkAbsoluteEncoder &rhs)=default
 
 ~SparkAbsoluteEncoder () override=default
 
double GetPosition () const override
 
double GetVelocity () const override
 
- Public Member Functions inherited from rev::AbsoluteEncoder
virtual ~AbsoluteEncoder ()
 

Friends

class SparkBase
 

Detailed Description

Get an instance of this class by using SparkBase::GetEncoder() or SparkBase::GetEncoder(SparkMaxRelativeEncoder::Type, int).

Constructor & Destructor Documentation

◆ SparkAbsoluteEncoder() [1/2]

rev::spark::SparkAbsoluteEncoder::SparkAbsoluteEncoder ( SparkAbsoluteEncoder &&  rhs)
default

◆ SparkAbsoluteEncoder() [2/2]

rev::spark::SparkAbsoluteEncoder::SparkAbsoluteEncoder ( const SparkAbsoluteEncoder rhs)
default

◆ ~SparkAbsoluteEncoder()

rev::spark::SparkAbsoluteEncoder::~SparkAbsoluteEncoder ( )
overridedefault

Member Function Documentation

◆ operator=()

SparkAbsoluteEncoder & rev::spark::SparkAbsoluteEncoder::operator= ( SparkAbsoluteEncoder &&  rhs)
default

◆ GetPosition()

double SparkAbsoluteEncoder::GetPosition ( ) const
overridevirtual

Get the position of the motor. This returns the native units of 'rotations' by default, and can be changed by a scale factor using setPositionConversionFactor().

Returns
Number of rotations of the motor

Implements rev::AbsoluteEncoder.

◆ GetVelocity()

double SparkAbsoluteEncoder::GetVelocity ( ) const
overridevirtual

Get the velocity of the motor. This returns the native units of 'rotations per second' by default, and can be changed by a scale factor using setVelocityConversionFactor().

Returns
Number of rotations per second of the motor

Implements rev::AbsoluteEncoder.

Friends And Related Function Documentation

◆ SparkBase

friend class SparkBase
friend

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