25 uint32_t
voltageMv()
const {
return m_state.vccMv; }
45 void setState(
const CoprocStat_PowerAdcStat& msg) { m_state = msg; }
47 CoprocStat_PowerAdcStat m_state;
Contains the battery state and can control the robot's power.
Definition: RBCXBattery.h:12
bool isPoweredByBattery() const
Definition: RBCXBattery.h:36
static constexpr uint32_t VOLTAGE_MAX
Maximal battery voltage, in mV.
Definition: RBCXBattery.h:19
static constexpr uint32_t VOLTAGE_MIN
Minimal battery voltage, in mV, at which the robot shuts down.
Definition: RBCXBattery.h:16
uint32_t voltageMv() const
returns battery Mid point voltage in mV
Definition: RBCXBattery.h:25
uint32_t bMidVoltageMv() const
returns current temperature as measured by the STM32 coprocessor in °C
Definition: RBCXBattery.h:28
uint32_t pct() const
returns current battery percentage (0-100)
Definition: RBCXBattery.cpp:22
int32_t temperatureC() const
Definition: RBCXBattery.h:31
static constexpr uint32_t BATTERY_IN_THRESHOLD
Definition: RBCXBattery.h:20
void shutdown()
shuts the robot's battery power
Definition: RBCXBattery.cpp:14
The main library class for working with the RBCX board. Call the install() method at the start of you...
Definition: RBCXManager.h:61
Definition: RBCXAngle.cpp:3