For a given BatteryCapacityType, the limits that define the state of the battery.
More...
For a given BatteryCapacityType, the limits that define the state of the battery.
Definition at line 63 of file Battery.h.
◆ canChangeBatteryState()
| bool BatteryCapacityInfo::canChangeBatteryState |
( |
| ) |
const |
Checks whether this capacity info has enough valid data to determine battery state.
- Returns
- True if battery state transitions can be computed from the current values.
◆ fromJSONNode()
| void BatteryCapacityInfo::fromJSONNode |
( |
const JSONNode & | node | ) |
|
Deserializes capacity info from a JSON node.
- Parameters
-
| [in] | node | The JSON node to read from. |
◆ operator!=()
Inequality comparison operator.
- Parameters
-
- Returns
- True if any field differs from
info.
◆ percent()
| fltp04 BatteryCapacityInfo::percent |
( |
| ) |
const |
Computes the capacity as a percentage of the maximum level.
- Returns
- The current level divided by the max level, as a value between 0 and 1.
◆ toJSONNode()
| void BatteryCapacityInfo::toJSONNode |
( |
JSONNode & | node | ) |
const |
Serializes this capacity info into a JSON node.
- Parameters
-
| [in] | node | The JSON node to populate. |
The documentation for this struct was generated from the following file: