VEX V5 C++ API
Public Member Functions | List of all members
vex::pot Class Reference

Use this class when programming with a potentiometer. More...

Inherits vex::__tridevice.

Public Member Functions

 pot (triport::port &port)
 Creates a new pot object on the port specified in the parameter. More...
 
 ~pot ()
 
int32_t value (analogUnits units)
 Gets the value of the potentiometer in the units defined in the parameter. More...
 
int32_t value (percentUnits units)
 Gets the value of the potentiometer in the units defined in the parameter. More...
 
double value (rotationUnits units)
 Gets the value of the potentiometer in the units defined in the parameter. More...
 

Detailed Description

Use this class when programming with a potentiometer.

Constructor & Destructor Documentation

◆ pot()

vex::pot::pot ( triport::port port)

Creates a new pot object on the port specified in the parameter.

Parameters
portA reference to a three wire port.

◆ ~pot()

vex::pot::~pot ( )

Member Function Documentation

◆ value() [1/3]

int32_t vex::pot::value ( analogUnits  units)

Gets the value of the potentiometer in the units defined in the parameter.

Returns
Returns an integer that represents the unit value specified by the parameter of the potentiometer device.
Parameters
unitsThe measurement unit for the potentiometer device.

◆ value() [2/3]

int32_t vex::pot::value ( percentUnits  units)
inline

Gets the value of the potentiometer in the units defined in the parameter.

Returns
Returns an integer that represents the unit value specified by the parameter of the potentiometer device.
Parameters
unitsThe measurement unit for the potentiometer device.

◆ value() [3/3]

double vex::pot::value ( rotationUnits  units)

Gets the value of the potentiometer in the units defined in the parameter.

Returns
Returns an integer that represents the unit value specified by the parameter of the potentiometer device.
Parameters
unitsThe measurement unit for the potentiometer device.