Merge branch 'develop' of https://github.com/JF002/Pinetime into develop

This commit is contained in:
JF 2020-11-20 18:37:36 +01:00
commit 83d1bdd03c
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,8 @@
# PineTime # 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. > 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. > We envision the PineTime as a companion for not only your PinePhone but also for your favorite devices — any phone, tablet, or even PC.

View File

@ -43,10 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
} }
std::unique_ptr<Screen> SystemInfo::CreateScreen1() { std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
auto batteryPercentF = batteryController.PercentRemaining(); auto batteryPercent = static_cast<uint8_t>(batteryController.PercentRemaining());
uint16_t batteryPercent = 0;
if(batteryPercentF > 100.0f) batteryPercent = 100;
else if(batteryPercentF < 0.0f) batteryPercent = 0;
uint8_t brightness = 0; uint8_t brightness = 0;
switch(brightnessController.Level()) { switch(brightnessController.Level()) {