From 0cbbd1dfc0881624bca20a20f1e05ed6c3674cbd Mon Sep 17 00:00:00 2001 From: Cameron Himes <31015399+Caton101@users.noreply.github.com> Date: Tue, 13 Apr 2021 21:40:42 -0400 Subject: [PATCH 1/3] Add Python modules to build instructions I had issues building InfiniTime for the first time because the instructions never mentioned needing these Python modules. Including them in the build documentation will help people not be confused like I was. I recommend adding all needed modules to this list. I only added the ones I knew I was missing. --- doc/buildAndProgram.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/buildAndProgram.md b/doc/buildAndProgram.md index cf349094..afd526e0 100644 --- a/doc/buildAndProgram.md +++ b/doc/buildAndProgram.md @@ -3,6 +3,7 @@ To build this project, you'll need: - A cross-compiler : [ARM-GCC (9-2020-q2-update)](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update) - The NRF52 SDK 15.3.0 : [nRF-SDK v15.3.0](https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip) + - The `cbor` and `intelhex` modules for Python 3 - A reasonably recent version of CMake (I use 3.16.5) ## Build steps From 3a938236d48430cb77660f15d712f7bc129d9539 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Sun, 2 May 2021 22:12:09 +0100 Subject: [PATCH 2/3] Fix a possible double free in StopWatch::Refresh. The lv_obj_del is called on btnStopLap when transitioning to the initial state, however the variable isn't then set to null. A subsequent call to Refresh would attempt to delete the already freed object. This could be triggered by stopping the stop watch, then pressing the physical button on the watch. Fixes https://github.com/JF002/InfiniTime/issues/315 --- src/displayapp/screens/StopWatch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp index e06981af..d7cd20c3 100644 --- a/src/displayapp/screens/StopWatch.cpp +++ b/src/displayapp/screens/StopWatch.cpp @@ -115,8 +115,9 @@ bool StopWatch::Refresh() { // Init state when an user first opens the app // and when a stop/reset button is pressed case States::Init: { - if (btnStopLap) { + if (btnStopLap != nullptr) { lv_obj_del(btnStopLap); + btnStopLap = nullptr; } // The initial default value lv_label_set_text(time, "00:00"); From 9a8824c35a03a6705ad629c1285f2caa87e36d89 Mon Sep 17 00:00:00 2001 From: Stoian Minaiev Date: Mon, 10 May 2021 15:13:33 +0300 Subject: [PATCH 3/3] SystemInfo app screen First screen. Let the build date and build time string be centered as well as the others --- src/displayapp/screens/SystemInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index f6e8d61a..ab349d7b 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -70,8 +70,8 @@ std::unique_ptr SystemInfo::CreateScreen1() { "#FFFF00 InfiniTime#\n\n" "#444444 Version# %ld.%ld.%ld\n\n" "#444444 Build date#\n" - "\t%s\n" - "\t%s\n", + "%s\n" + "%s\n", Version::Major(), Version::Minor(), Version::Patch(), @@ -242,4 +242,4 @@ std::unique_ptr SystemInfo::CreateScreen5() { lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); return std::unique_ptr(new Screens::Label(4, 5, app, label)); -} \ No newline at end of file +}