|
Lamp-Da 0.1
A compact lantern project
|
Interface for the physical components of the battery. More...
Go to the source code of this file.
Namespaces | |
| namespace | lampda |
| Program scope. | |
| namespace | lampda::physical |
| Handle the physical modules drivers. | |
| namespace | lampda::physical::battery |
| Handle the battery measurments and gestion. | |
Functions | |
| uint16_t | lampda::physical::battery::get_raw_battery_voltage_mv () |
| Return the battery voltage and raise the battery incoherent alert if needed. | |
| bool | lampda::physical::battery::is_battery_usable_as_power_source () |
| return true if the battery pack can be used as a energy source This status is updated after calling get_raw_battery_voltage_mv | |
| bool | lampda::physical::battery::can_battery_be_charged () |
| Return true if this battery can be charged Check only for validity, not voltage. If this is false, starting a charge process can break the system This status is updated after calling get_raw_battery_voltage_mv. | |
| uint16_t | lampda::physical::battery::liion_mv_to_battery_percent (const uint16_t liionLevel_mv, const uint8_t batteryCountSerie) |
| convert a single liion battery voltage to a percent level model | |
| uint16_t | lampda::physical::battery::get_level_percent (const uint16_t batteryVoltage_mV, const uint8_t cellCount=batteryCount) |
| transform a battery voltage measurment to a percent * 100 estimate | |
| uint16_t | lampda::physical::battery::get_level_safe (const uint16_t battery_mv, const uint8_t cellCount=batteryCount) |
| returns the battery level, mapped to the desired safe battery level | |
| uint16_t | lampda::physical::battery::get_battery_level () |
| returns the battery level, corresponding to user safe choice (0-10000) | |
| uint16_t | lampda::physical::battery::get_battery_minimum_cell_level () |
| Return the level of the cell of the stack with the minimum battery. | |
| uint16_t | lampda::physical::battery::get_battery_maximum_cell_level () |
| Return the level of the cell of the stack with the maximum battery. | |
Interface for the physical components of the battery.