From c816d9b88ee9bcc9c524da3f0c478f93eb965dcb Mon Sep 17 00:00:00 2001 From: Samuel Archibald Date: Mon, 2 Nov 2020 23:29:42 -0500 Subject: [PATCH] Fix to #119 --- src/displayapp/screens/SystemInfo.cpp | 9 ++++----- 1 file 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 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 SystemInfo::CreateScreen1() { dateTimeController.Day(), static_cast(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(new Screens::Label(app, t1)); }