VEXcode IQ C++ Unofficial documentation for version 3.0.4.1
Loading...
Searching...
No Matches
vex::brain::battery Class Reference

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

#include <vex_brain.h>

Public Member Functions

uint16_t capacity (percentUnits units=percentUnits::pct)
 Gets the battery capacity.
 
double voltage (voltageUnits units=voltageUnits::volt)
 Gets the battery voltage.
 

Detailed Description

Use the battery class to see information about the battery.

Definition at line 319 of file vex_brain.h.

Constructor & Destructor Documentation

◆ battery()

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

Definition at line 321 of file vex_brain.h.

◆ ~battery()

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

Definition at line 322 of file vex_brain.h.

Member Function Documentation

◆ capacity()

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

Gets the battery capacity.

Returns
Returns an integer that represents the batteries 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.

◆ voltage()

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

Gets the battery voltage.

Returns
Returns a double that represents the batteries voltage in the units specified by the parameter.
Parameters
unitsThe unit of voltage to be returned.

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