Use the battery class to see information about the battery.
More...
#include <vex_brain.h>
|
| uint16_t | capacity (percentUnits units=percentUnits::pct) |
| | Gets the battery capacity.
|
| |
| double | voltage (voltageUnits units=voltageUnits::volt) |
| | Gets the battery voltage.
|
| |
Use the battery class to see information about the battery.
Definition at line 319 of file vex_brain.h.
◆ battery()
| vex::brain::battery::battery |
( |
| ) |
|
|
inline |
◆ ~battery()
| vex::brain::battery::~battery |
( |
| ) |
|
|
inline |
◆ 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
-
| units | The unit of voltage to be returned. |
The documentation for this class was generated from the following file: