diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-10-05 12:45:03 +0300 |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2021-10-05 12:45:03 +0300 |
| commit | f61e88b8425f9edcd38e47027df62dcc56c83adc (patch) | |
| tree | 1faacaf82f085ce6ca718d598b13a4f509a8e0ff /src/components/battery/BatteryController.h | |
| parent | e468acc99e4d7e188dc902983640f5eb8e8ff31f (diff) | |
| parent | 392c7ad2aceecd8fe976165b66d39f0ed2083911 (diff) | |
Merge branch 'develop' into update_touch_driver
Diffstat (limited to 'src/components/battery/BatteryController.h')
| -rw-r--r-- | src/components/battery/BatteryController.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index 8af27ea8..c78ffb3f 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -22,7 +22,9 @@ namespace Pinetime { } bool IsCharging() const { - return isCharging; + // isCharging will go up and down when fully charged + // isFull makes sure this returns false while fully charged. + return isCharging && !isFull; } bool IsPowerPresent() const { @@ -37,6 +39,7 @@ namespace Pinetime { uint16_t voltage = 0; uint8_t percentRemaining = 0; + bool isFull = false; bool isCharging = false; bool isPowerPresent = false; |
