Class rb::Battery
Contains the battery state and can control the robot's power.
#include <RBCXBattery.h>
Public Static Attributes
Type | Name |
---|---|
constexpr uint32_t | BATTERY_IN_THRESHOLD = = 5000 |
constexpr uint32_t | VOLTAGE_MAX = = 4200 * 2 Maximal battery voltage, in mV. |
constexpr uint32_t | VOLTAGE_MIN = = 3300 |
* 2 Minimal battery voltage, in mV, at which the robot shuts down. |
Public Functions
Type | Name |
---|---|
uint32_t | bMidVoltageMv () const returns current temperature as measured by the STM32 coprocessor |
bool | isPoweredByBattery () const |
uint32_t | pct () const returns current battery voltage |
void | shutdown () shuts the robot's battery power |
int32_t | temperatureC () const |
uint32_t | voltageMv () const returns battery Mid point voltage |
Public Static Attributes Documentation
variable BATTERY_IN_THRESHOLD
constexpr uint32_t rb::Battery::BATTERY_IN_THRESHOLD;
variable VOLTAGE_MAX
constexpr uint32_t rb::Battery::VOLTAGE_MAX;
variable VOLTAGE_MIN
constexpr uint32_t rb::Battery::VOLTAGE_MIN;
Public Functions Documentation
function bMidVoltageMv
inline uint32_t rb::Battery::bMidVoltageMv () const
function isPoweredByBattery
inline bool rb::Battery::isPoweredByBattery () const
function pct
returns current battery voltage
uint32_t rb::Battery::pct () const
returns current battery percentage
function shutdown
shuts the robot's battery power
void rb::Battery::shutdown ()
Returns true if the Robot's battery power branch is on
function temperatureC
inline int32_t rb::Battery::temperatureC () const
function voltageMv
inline uint32_t rb::Battery::voltageMv () const
The documentation for this class was generated from the following file demo-projets/esp/RBCXBattery.h