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

Use the battery class to see information about the battery. More...

Public Member Functions

 battery ()
 
 ~battery ()
 
uint32_t capacity (percentUnits units=percentUnits::pct)
 Gets the battery capacity. More...
 
double temperature (percentUnits units=percentUnits::pct)
 
double temperature (temperatureUnits units)
 Gets the battery temperature. More...
 
double voltage (voltageUnits units)
 Gets the battery voltage. More...
 
double current (currentUnits units)
 Gets the battery current. More...
 

Detailed Description

Use the battery class to see information about the battery.

Constructor & Destructor Documentation

◆ battery()

vex::brain::battery::battery ( )
inline

◆ ~battery()

vex::brain::battery::~battery ( )
inline

Member Function Documentation

◆ capacity()

uint32_t vex::brain::battery::capacity ( percentUnits  units = percentUnits::pct)

Gets the battery capacity.

Returns
Returns the battery capacity in the units specified by the parameter.
Parameters
units(Optional) The type of unit that will be returned. By default, this parameter is a percentage.

◆ temperature() [1/2]

double vex::brain::battery::temperature ( percentUnits  units = percentUnits::pct)
@brief Gets the battery temperature.
@return Returns the battery temperature in the units specified by the parameter.
Parameters
units(Optional) The type of unit that will be returned. By default, this parameter is a percentage.

◆ temperature() [2/2]

double vex::brain::battery::temperature ( temperatureUnits  units)

Gets the battery temperature.

Returns
Returns the battery temperature in the units specified by the parameter.
Parameters
unitsThe unit of temperature that will be returned.

◆ voltage()

double vex::brain::battery::voltage ( voltageUnits  units)

Gets the battery voltage.

Returns
Returns the battery voltage in the units specified by the parameter.
Parameters
unitsThe unit of voltage to be returned.

◆ current()

double vex::brain::battery::current ( currentUnits  units)

Gets the battery current.

Returns
Returns the battery current in the units specified by the parameter.
Parameters
unitsThe type of current to be returned.