diff options
author | Samuel Archibald <samuel.archibald00@gmail.com> | 2020-11-16 09:43:32 -0500 |
---|---|---|
committer | Samuel Archibald <samuel.archibald00@gmail.com> | 2020-11-16 09:43:32 -0500 |
commit | 600dbb0280aae3cc45f7256ac845780663eaf7f8 (patch) | |
tree | 0be086842f9a53807cbe94510c88f1b04cec55b2 /src/displayapp/screens/SystemInfo.cpp | |
parent | c816d9b88ee9bcc9c524da3f0c478f93eb965dcb (diff) |
Fix for comments on issue #125, bounds check removed
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
-rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 34359c2c..81704303 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -43,9 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) { } std::unique_ptr<Screen> SystemInfo::CreateScreen1() { - auto batteryPercent = batteryController.PercentRemaining(); - if(batteryPercent > 100.0f) batteryPercent = 100; - else if(batteryPercent < 0.0f) batteryPercent = 0; + int8_t batteryPercent = (int)batteryController.PercentRemaining(); uint8_t brightness = 0; switch(brightnessController.Level()) { |