From c63b97c65e27110b3e9f0e83b714f49854e9a495 Mon Sep 17 00:00:00 2001 From: incyi Date: Tue, 28 Jul 2020 22:51:14 +0200 Subject: [PATCH 1/7] Update README.md add ci badge. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index fec2fb92..14f3328c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # PineTime + +![CI](https://github.com/JF002/Pinetime/workflows/CI/badge.svg) + > 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. From 58c0f3ba253d3f9848e5d09b679f7f334e442d5a Mon Sep 17 00:00:00 2001 From: incyi Date: Wed, 7 Oct 2020 18:01:01 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 14f3328c..6eebbac4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PineTime -![CI](https://github.com/JF002/Pinetime/workflows/CI/badge.svg) +![Build PineTime Firmware](https://github.com/JF002/Pinetime/workflows/Build%20PineTime%20Firmware/badge.svg) > 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. From aa3735f5c8c8dc3f9cdcdd91e084a5e508d24e8a Mon Sep 17 00:00:00 2001 From: incyi Date: Wed, 7 Oct 2020 18:02:09 +0200 Subject: [PATCH 3/7] Update README.md Branch set to develop. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6eebbac4..9eeee4a0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PineTime -![Build PineTime Firmware](https://github.com/JF002/Pinetime/workflows/Build%20PineTime%20Firmware/badge.svg) +![Build PineTime Firmware](https://github.com/JF002/Pinetime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=develop) > 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. From c816d9b88ee9bcc9c524da3f0c478f93eb965dcb Mon Sep 17 00:00:00 2001 From: Samuel Archibald Date: Mon, 2 Nov 2020 23:29:42 -0500 Subject: [PATCH 4/7] 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)); } From 600dbb0280aae3cc45f7256ac845780663eaf7f8 Mon Sep 17 00:00:00 2001 From: Samuel Archibald Date: Mon, 16 Nov 2020 09:43:32 -0500 Subject: [PATCH 5/7] Fix for comments on issue #125, bounds check removed --- src/displayapp/screens/SystemInfo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 34359c2c..81704303 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -43,9 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) { } std::unique_ptr SystemInfo::CreateScreen1() { - auto batteryPercent = batteryController.PercentRemaining(); - if(batteryPercent > 100.0f) batteryPercent = 100; - else if(batteryPercent < 0.0f) batteryPercent = 0; + int8_t batteryPercent = (int)batteryController.PercentRemaining(); uint8_t brightness = 0; switch(brightnessController.Level()) { From 3703611a6013f4f0905ab4f3de9f3157e73f52b5 Mon Sep 17 00:00:00 2001 From: Samuel Archibald Date: Wed, 18 Nov 2020 00:00:33 -0500 Subject: [PATCH 6/7] Fixes #119! Improved based off suggested changes --- src/displayapp/screens/SystemInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 81704303..83384fbd 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -43,7 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) { } std::unique_ptr SystemInfo::CreateScreen1() { - int8_t batteryPercent = (int)batteryController.PercentRemaining(); + auto batteryPercent = static_cast(batteryController.PercentRemaining()); uint8_t brightness = 0; switch(brightnessController.Level()) { @@ -95,7 +95,7 @@ std::unique_ptr SystemInfo::CreateScreen1() { dateTimeController.Day(), static_cast(dateTimeController.Month()), dateTimeController.Year(), dateTimeController.Hours(), dateTimeController.Minutes(), dateTimeController.Seconds(), uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds, - (int) batteryPercent, brightness, resetReason); + batteryPercent, brightness, resetReason); return std::unique_ptr(new Screens::Label(app, t1)); } From 9d96b09048416d164d23c6945837bdb7efa73f2c Mon Sep 17 00:00:00 2001 From: incyi Date: Wed, 18 Nov 2020 08:49:27 +0100 Subject: [PATCH 7/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9eeee4a0..09e85ddc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PineTime -![Build PineTime Firmware](https://github.com/JF002/Pinetime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=develop) +![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.