summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--src/displayapp/screens/SystemInfo.cpp5
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3c607e1a..e1819d0f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# PineTime
+
+![Build PineTime Firmware](https://github.com/JF002/Pinetime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master)
+
> 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 867fdaeb..83384fbd 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()) {