From f26266ba76938a98edcfd9e887cc03fe0fdce494 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sun, 7 Sep 2025 11:44:18 +0200 Subject: [PATCH] Fix bug and update external app sdk versions (#324) - Fix bug in Development app: when launching/stopping external app due to LVGL being stopped and a timer still being active (sometimes, as it's a race condition) - Added TODO to fix the same bug in other apps - Update external app SDKs to `0.5.0-SNAPSHOT` --- Documentation/ideas.md | 3 ++- ExternalApps/Calculator/tactility.properties | 2 +- ExternalApps/GraphicsDemo/tactility.properties | 2 +- ExternalApps/HelloWorld/tactility.properties | 2 +- Tactility/Source/app/development/Development.cpp | 4 +++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Documentation/ideas.md b/Documentation/ideas.md index 6b0a9dc3..966a7145 100644 --- a/Documentation/ideas.md +++ b/Documentation/ideas.md @@ -16,7 +16,8 @@ - Create an "app install paths" settings app to add/remove paths. Scan these paths on startup. Make the AppList use the scan results. - +- Apps with update timer should check `lvgl::isStarted()` + ## Medium Priority - Unify the way displays are dimmed. Some implementations turn off the display when it's fully dimmed. Make this a separate functionality. diff --git a/ExternalApps/Calculator/tactility.properties b/ExternalApps/Calculator/tactility.properties index aa5aa4a2..761d0ac0 100644 --- a/ExternalApps/Calculator/tactility.properties +++ b/ExternalApps/Calculator/tactility.properties @@ -1,2 +1,2 @@ [sdk] -version = 0.4.0 +version = 0.5.0-SNAPSHOT diff --git a/ExternalApps/GraphicsDemo/tactility.properties b/ExternalApps/GraphicsDemo/tactility.properties index aa5aa4a2..761d0ac0 100644 --- a/ExternalApps/GraphicsDemo/tactility.properties +++ b/ExternalApps/GraphicsDemo/tactility.properties @@ -1,2 +1,2 @@ [sdk] -version = 0.4.0 +version = 0.5.0-SNAPSHOT diff --git a/ExternalApps/HelloWorld/tactility.properties b/ExternalApps/HelloWorld/tactility.properties index aa5aa4a2..761d0ac0 100644 --- a/ExternalApps/HelloWorld/tactility.properties +++ b/ExternalApps/HelloWorld/tactility.properties @@ -1,2 +1,2 @@ [sdk] -version = 0.4.0 +version = 0.5.0-SNAPSHOT diff --git a/Tactility/Source/app/development/Development.cpp b/Tactility/Source/app/development/Development.cpp index 13a1ea26..3089e73a 100644 --- a/Tactility/Source/app/development/Development.cpp +++ b/Tactility/Source/app/development/Development.cpp @@ -1,5 +1,7 @@ #ifdef ESP_PLATFORM +#include "Tactility/lvgl/Lvgl.h" + #include #include @@ -28,7 +30,7 @@ class DevelopmentApp final : public App { Timer timer = Timer(Timer::Type::Periodic, [this] { auto lock = lvgl::getSyncLock()->asScopedLock(); - if (lock.lock(lvgl::defaultLockTime)) { + if (lock.lock(lvgl::defaultLockTime) && lvgl::isStarted()) { updateViewState(); } });