InfiniTime.git

commit 754918fda6a1ead2c6a8b440af489aae038918d0

Author: JF <jf@codingfield.com>

Fix bad formatting in SystemInfo.

 src/DisplayApp/Screens/Clock.h | 2 +-
 src/DisplayApp/Screens/SystemInfo.cpp | 9 +++++----


diff --git a/src/DisplayApp/Screens/Clock.h b/src/DisplayApp/Screens/Clock.h
index e1e10bdfd4eb69a998c67041ebcf551395b961d3..7363fdaf46ec9998d17322edef4e37b374f77388 100644
--- a/src/DisplayApp/Screens/Clock.h
+++ b/src/DisplayApp/Screens/Clock.h
@@ -57,7 +57,7 @@           Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown;
           Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
           uint8_t currentDay = 0;
 
-          DirtyValue<uint8_t> batteryPercentRemaining  {0};
+          DirtyValue<float> batteryPercentRemaining  {0};
           DirtyValue<bool> bleState {false};
           DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime;
           DirtyValue<uint32_t> stepCount  {0};




diff --git a/src/DisplayApp/Screens/SystemInfo.cpp b/src/DisplayApp/Screens/SystemInfo.cpp
index ef55eb5ffb18abde3f3433106214e4efe581614a..fcafcf7d26a075a56d67006354c3b090c75c54d7 100644
--- a/src/DisplayApp/Screens/SystemInfo.cpp
+++ b/src/DisplayApp/Screens/SystemInfo.cpp
@@ -43,9 +43,10 @@   return screens.OnTouchEvent(event);
 }
 
 std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
-  auto batteryPercent = static_cast<int16_t>(batteryController.PercentRemaining());
-  if(batteryPercent > 100) batteryPercent = 100;
-  else if(batteryPercent < 0) batteryPercent = 0;
+  auto batteryPercentF = batteryController.PercentRemaining();
+  uint16_t batteryPercent = 0;
+  if(batteryPercentF > 100.0f) batteryPercent = 100;
+  else if(batteryPercentF < 0.0f) batteryPercent = 0;
 
   uint8_t brightness = 0;
   switch(brightnessController.Level()) {
@@ -86,7 +87,7 @@   sprintf(t1, "Pinetime\n"
               "Version:%ld.%ld.%ld\n"
               "Build: %s\n"
               "       %s\n"
-              "Date: %02d/%02hhu/%04d\n"
+              "Date: %02d/%02d/%04d\n"
               "Time: %02d:%02d:%02d\n"
               "Uptime: %02lud %02lu:%02lu:%02lu\n"
               "Battery: %d%%\n"