REVLib - C++
rev::AnalogInput Class Referenceabstract

#include <AnalogInput.h>

Inherited by rev::spark::SparkAnalogSensor.

Public Member Functions

virtual ~AnalogInput ()
 
virtual double GetVoltage () const =0
 
virtual double GetPosition () const =0
 

Friends

class spark::SparkAnalogSensor
 

Detailed Description

Get an instance of AnalogInput by using SparkBase::GetAnalog(SparkAnalogSensor::Mode)}.

Constructor & Destructor Documentation

◆ ~AnalogInput()

virtual rev::AnalogInput::~AnalogInput ( )
inlinevirtual

Member Function Documentation

◆ GetVoltage()

virtual double rev::AnalogInput::GetVoltage ( ) const
pure virtual

Get the voltage of the analog sensor.

Returns
Voltage of the sensor

Implemented in rev::spark::SparkAnalogSensor.

◆ GetPosition()

virtual double rev::AnalogInput::GetPosition ( ) const
pure virtual

Get the position of the motor. 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

Implemented in rev::spark::SparkAnalogSensor.

Friends And Related Function Documentation

◆ spark::SparkAnalogSensor

friend class spark::SparkAnalogSensor
friend

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