Contains the battery state and can control the robot's power.
More...
#include <RBControl_battery.hpp>
|
| static constexpr uint32_t | VOLTAGE_MIN = 3300 * 2 |
| | Minimal battery voltage, in mV, at which the robot shuts down. More...
|
| |
| static constexpr uint32_t | VOLTAGE_MAX = 4200 * 2 |
| | Maximal battery voltage, in mV. More...
|
| |
| static constexpr uint32_t | VOLTAGE_WARNING = 3500 * 2 |
| | The voltage at which alert triggers. More...
|
| |
| static constexpr float | BATT_DIVIDER = 10.0f / (82.0f + 10.0f) |
| | Voltage divider ratio. More...
|
| |
Contains the battery state and can control the robot's power.
◆ fineTuneCoef()
| float rb::Battery::fineTuneCoef |
( |
| ) |
const |
◆ pct()
| uint32_t rb::Battery::pct |
( |
| ) |
const |
returns current battery percentage
◆ raw()
| uint32_t rb::Battery::raw |
( |
| ) |
const |
◆ setFineTuneCoef()
| void rb::Battery::setFineTuneCoef |
( |
float |
coef | ) |
|
Tunes battery measurement to compensate e.g. for voltage divider error. Default 1, expected to be 0.5 to 1.5.
◆ shutdown()
| void rb::Battery::shutdown |
( |
| ) |
|
◆ voltageMv()
| uint32_t rb::Battery::voltageMv |
( |
| ) |
const |
returns current battery voltage
◆ Manager
◆ BATT_DIVIDER
| constexpr float rb::Battery::BATT_DIVIDER = 10.0f / (82.0f + 10.0f) |
|
staticconstexpr |
◆ VOLTAGE_MAX
| constexpr uint32_t rb::Battery::VOLTAGE_MAX = 4200 * 2 |
|
staticconstexpr |
Maximal battery voltage, in mV.
◆ VOLTAGE_MIN
| constexpr uint32_t rb::Battery::VOLTAGE_MIN = 3300 * 2 |
|
staticconstexpr |
Minimal battery voltage, in mV, at which the robot shuts down.
◆ VOLTAGE_WARNING
| constexpr uint32_t rb::Battery::VOLTAGE_WARNING = 3500 * 2 |
|
staticconstexpr |
The voltage at which alert triggers.
The documentation for this class was generated from the following files: