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

#include <SparkAnalogSensor.h>

Inherits rev::AnalogInput.

Public Member Functions

 SparkAnalogSensor (SparkAnalogSensor &&)=default
 
SparkAnalogSensoroperator= (SparkAnalogSensor &&)=default
 
 SparkAnalogSensor (const SparkAnalogSensor &rhs)=default
 
 ~SparkAnalogSensor () override=default
 
double GetVoltage () const override
 
double GetPosition () const override
 
double GetVelocity () const
 
- Public Member Functions inherited from rev::AnalogInput
virtual ~AnalogInput ()
 

Friends

class SparkBase
 

Constructor & Destructor Documentation

◆ SparkAnalogSensor() [1/2]

rev::spark::SparkAnalogSensor::SparkAnalogSensor ( SparkAnalogSensor &&  )
default

◆ SparkAnalogSensor() [2/2]

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

◆ ~SparkAnalogSensor()

rev::spark::SparkAnalogSensor::~SparkAnalogSensor ( )
overridedefault

Member Function Documentation

◆ operator=()

SparkAnalogSensor & rev::spark::SparkAnalogSensor::operator= ( SparkAnalogSensor &&  )
default

◆ GetVoltage()

double SparkAnalogSensor::GetVoltage ( ) const
overridevirtual

Get the voltage of the analog sensor.

Returns
Voltage of the sensor

Implements rev::AnalogInput.

◆ GetPosition()

double SparkAnalogSensor::GetPosition ( ) const
overridevirtual

Get the position of the sensor. Returns value in the native unit of 'volt' by default, and can be changed by a scale factor using setPositionConversionFactor().

Returns
Position of the sensor in volts

Implements rev::AnalogInput.

◆ GetVelocity()

double SparkAnalogSensor::GetVelocity ( ) const

Get the velocity of the sensor. Returns value in the native units of 'volts per second' by default, and can be changed by a scale factor using setVelocityConversionFactor().

Returns
Velocity of the sensor in volts per second

Friends And Related Function Documentation

◆ SparkBase

friend class SparkBase
friend

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