summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/SystemInfo.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-07-11 14:55:06 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-07-11 14:55:06 (GMT)
commite21f6a7f414d1f832e8fddfeaab3b9de05aa3459 (patch)
treea4ebbc3a74ba7daf87aa99c0eafcb0e9e7bc6c35 /src/displayapp/screens/SystemInfo.cpp
parent6a91b83b12ef849f68d54f490153b02f0ecf58dc (diff)
Notify battery level every 10 minutes when connected to a BLE host.
Refactor battery percent : only use uint8_t to store the battery % remaining.
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
-rw-r--r--src/displayapp/screens/SystemInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp
index 5ae3a59..f5bf0cc 100644
--- a/src/displayapp/screens/SystemInfo.cpp
+++ b/src/displayapp/screens/SystemInfo.cpp
@@ -103,7 +103,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
}
std::unique_ptr<Screen> SystemInfo::CreateScreen2() {
- auto batteryPercent = static_cast<uint8_t>(batteryController.PercentRemaining());
+ auto batteryPercent = batteryController.PercentRemaining();
auto resetReason = [this]() {
switch (watchdog.ResetReason()) {
case Drivers::Watchdog::ResetReasons::Watchdog: