diff options
author | Samuel Archibald <samuel.archibald00@gmail.com> | 2020-11-02 23:29:42 -0500 |
---|---|---|
committer | Samuel Archibald <samuel.archibald00@gmail.com> | 2020-11-02 23:29:42 -0500 |
commit | c816d9b88ee9bcc9c524da3f0c478f93eb965dcb (patch) | |
tree | be7c90df28494b4d1dba44d1c8f352fd7e0a0c36 /src | |
parent | 0e97db1c30748d9893291a27504bb55723f58e7d (diff) |
Fix to #119
Diffstat (limited to 'src')
-rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 867fdaeb..34359c2c 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -43,10 +43,9 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) { } std::unique_ptr<Screen> SystemInfo::CreateScreen1() { - auto batteryPercentF = batteryController.PercentRemaining(); - uint16_t batteryPercent = 0; - if(batteryPercentF > 100.0f) batteryPercent = 100; - else if(batteryPercentF < 0.0f) batteryPercent = 0; + auto batteryPercent = batteryController.PercentRemaining(); + if(batteryPercent > 100.0f) batteryPercent = 100; + else if(batteryPercent < 0.0f) batteryPercent = 0; uint8_t brightness = 0; switch(brightnessController.Level()) { @@ -98,7 +97,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen1() { dateTimeController.Day(), static_cast<uint8_t>(dateTimeController.Month()), dateTimeController.Year(), dateTimeController.Hours(), dateTimeController.Minutes(), dateTimeController.Seconds(), uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds, - batteryPercent, brightness, resetReason); + (int) batteryPercent, brightness, resetReason); return std::unique_ptr<Screen>(new Screens::Label(app, t1)); } |