diff options
| author | JF <jf@codingfield.com> | 2020-11-20 17:37:36 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-11-20 17:37:36 (GMT) |
| commit | 83d1bdd03cb12bf24d14a6d020cda0d09d7ae6c0 (patch) | |
| tree | d4c888387442cba5f4482f6dd7d1cace7bfb2b9f | |
| parent | a205509cbe02a7551f6db95a24b99fb82f668bc7 (diff) | |
| parent | fa4c0d5e3e278b086362ca099b3ab781d37686f2 (diff) | |
Merge branch 'develop' of https://github.com/JF002/Pinetime into develop
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 5 |
2 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,8 @@ # PineTime + + + > The PineTime is a free and open source smartwatch capable of running custom-built open operating systems. Some of the notable features include a heart rate monitor, a week-long battery as well as a capacitive touch IPS display that is legible in direct sunlight. It is a fully community driven side-project, which means that it will ultimately be up to the developers and end-users to determine when they deem the PineTime ready to ship. > We envision the PineTime as a companion for not only your PinePhone but also for your favorite devices — any phone, tablet, or even PC. diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 867fdae..83384fb 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -43,10 +43,7 @@ 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 = static_cast<uint8_t>(batteryController.PercentRemaining()); uint8_t brightness = 0; switch(brightnessController.Level()) { |
