Skip to content

Module improvements#585

Merged
KenVanHoeylandt merged 8 commits into
mainfrom
develop
Jul 25, 2026
Merged

Module improvements#585
KenVanHoeylandt merged 8 commits into
mainfrom
develop

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Jul 25, 2026

Copy link
Copy Markdown
Contributor
  • Created path prefixes for modules: lvgl-module, gps-module, crypt-module.
  • Split lvgl_module.h in lvgl.h and module.h so that apps won't include it (and won't have a missing symbol issue).
  • Updated some lvgl mutex usages.
  • Other related fixes.

Summary by CodeRabbit

  • New Features
    • Added public cryptography APIs for AES-256-CBC encryption/decryption with IV helpers, plus DJB2 hashing.
    • Expanded LVGL public interface with pointer calibration, PPA support, shared icon/font/statusbar icon sets, and a formal LVGL module interface.
  • Refactor
    • Updated devices, apps, and services to use the new public LVGL/cryptography header paths and the updated LVGL module interface location.
    • Improved LVGL synchronization/guarding around UI updates.
  • Bug Fixes
    • Increased LVGL lock wait time and updated status bar refresh logic to use an “LVGL running” guard for more reliable updates.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@KenVanHoeylandt, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 727a1d40-eb52-450f-beac-a08ff9a2d2ca

📥 Commits

Reviewing files that changed from the base of the PR and between f52dd36 and 7deeda5.

📒 Files selected for processing (5)
  • Documentation/ideas.md
  • TactilityKernel/include/tactility/drivers/display_placeholder.h
  • TactilityKernel/source/drivers/display_placeholder.cpp
  • TactilityKernel/source/kernel_init.cpp
  • TactilityKernel/source/symbols.c
📝 Walkthrough

Walkthrough

The change introduces module-specific public headers for cryptography, GPS, and LVGL APIs. Existing implementations, applications, services, device modules, wrappers, and tests are updated to use the new header namespaces. LVGL lifecycle configuration moves into lvgl/module.h, while synchronization in selected applications changes to direct LVGL lock APIs and running-state checks. New LVGL display, input, font, icon, and PPA interfaces are declared in dedicated headers.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too vague and does not describe the main changes, so it doesn't meaningfully summarize the PR. Rename it to a specific summary such as “Split LVGL module headers and update module include paths”.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Tactility/Source/app/gpssettings/GpsSettings.cpp (1)

178-208: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Only unlock after successfully acquiring the LVGL mutex.

When lvgl_try_lock() times out, the unconditional lvgl_unlock() at line 208 is still executed. Both LVGL unlock implementations call down to the underlying unlock primitive when initialized, so this can violate mutex ownership and hit a mutex assertion or corrupt synchronization state.

Proposed fix
         if (lvgl_try_lock(100 / portTICK_PERIOD_MS)) {
             for (auto& row : deviceRows) {
                 // ...
             }
+            lvgl_unlock();
         }
-        lvgl_unlock();
🧹 Nitpick comments (3)
Modules/crypt-module/source/module.cpp (1)

2-3: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include the public module header in its implementation.

module.cpp defines crypt_module but does not include <crypt/module.h>, so the new export declaration is not checked against its definition. Include the module header while retaining <tactility/module.h> for the complete type definition.

Proposed include update
 `#include` <crypt/crypt.h>
 `#include` <crypt/hash.h>
+#include <crypt/module.h>
 `#include` <tactility/module.h>
Modules/lvgl-module/include/lvgl/lvgl_fonts.h (1)

17-27: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use (void) for no-argument C declarations.

Because this header exposes a C API, declarations such as lvgl_get_shared_icon_font() do not enforce an empty parameter list in C. Change all no-argument getters, and their definitions, to (void).

Proposed fix
-const lv_font_t* lvgl_get_shared_icon_font();
-uint32_t lvgl_get_shared_icon_font_height();
+const lv_font_t* lvgl_get_shared_icon_font(void);
+uint32_t lvgl_get_shared_icon_font_height(void);

-const lv_font_t* lvgl_get_launcher_icon_font();
-uint32_t lvgl_get_launcher_icon_font_height();
+const lv_font_t* lvgl_get_launcher_icon_font(void);
+uint32_t lvgl_get_launcher_icon_font_height(void);

-const lv_font_t* lvgl_get_statusbar_icon_font();
-uint32_t lvgl_get_statusbar_icon_font_height();
+const lv_font_t* lvgl_get_statusbar_icon_font(void);
+uint32_t lvgl_get_statusbar_icon_font_height(void);
Modules/lvgl-module/include/lvgl/lvgl_pointer.h (1)

8-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include the standard types used directly by this public header.

LvglPointerCalibration uses int32_t and the API returns bool, but this header relies on transitive declarations from <lvgl.h>. Add <stdint.h> and <stdbool.h> explicitly.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e75c22ec-964e-4a4a-9edd-cd124a49f0b1

📥 Commits

Reviewing files that changed from the base of the PR and between ca5b071 and 5d6bc6b.

📒 Files selected for processing (87)
  • Devices/lilygo-tdeck-plus/source/module.cpp
  • Devices/lilygo-tdeck/source/module.cpp
  • Devices/lilygo-tlora-pager/source/module.cpp
  • Devices/m5stack-tab5/Source/devices/tab5_keyboard.cpp
  • Modules/crypt-module/include/crypt/crypt.h
  • Modules/crypt-module/include/crypt/hash.h
  • Modules/crypt-module/include/crypt/module.h
  • Modules/crypt-module/source/crypt.cpp
  • Modules/crypt-module/source/hash.cpp
  • Modules/crypt-module/source/module.cpp
  • Modules/gps-module/include/gps/module.h
  • Modules/gps-module/source/module.cpp
  • Modules/lvgl-module/include/lvgl/lvgl.h
  • Modules/lvgl-module/include/lvgl/lvgl_display.h
  • Modules/lvgl-module/include/lvgl/lvgl_fonts.h
  • Modules/lvgl-module/include/lvgl/lvgl_icon_launcher.h
  • Modules/lvgl-module/include/lvgl/lvgl_icon_shared.h
  • Modules/lvgl-module/include/lvgl/lvgl_icon_statusbar.h
  • Modules/lvgl-module/include/lvgl/lvgl_keyboard.h
  • Modules/lvgl-module/include/lvgl/lvgl_pointer.h
  • Modules/lvgl-module/include/lvgl/lvgl_ppa.h
  • Modules/lvgl-module/include/lvgl/module.h
  • Modules/lvgl-module/source/arch/lvgl_esp32.c
  • Modules/lvgl-module/source/arch/lvgl_posix.c
  • Modules/lvgl-module/source/lvgl.c
  • Modules/lvgl-module/source/lvgl_devices.c
  • Modules/lvgl-module/source/lvgl_display.c
  • Modules/lvgl-module/source/lvgl_fonts.c
  • Modules/lvgl-module/source/lvgl_keyboard.c
  • Modules/lvgl-module/source/lvgl_pointer.c
  • Modules/lvgl-module/source/lvgl_ppa.c
  • Modules/lvgl-module/source/module.c
  • Modules/lvgl-module/source/symbols.c
  • Tactility/Source/Tactility.cpp
  • Tactility/Source/app/addgps/AddGps.cpp
  • Tactility/Source/app/apphub/AppHubApp.cpp
  • Tactility/Source/app/applist/AppList.cpp
  • Tactility/Source/app/appsettings/AppSettings.cpp
  • Tactility/Source/app/audiosettings/AudioSettings.cpp
  • Tactility/Source/app/btmanage/BtManage.cpp
  • Tactility/Source/app/btmanage/View.cpp
  • Tactility/Source/app/chat/ChatApp.cpp
  • Tactility/Source/app/chat/ChatSettings.cpp
  • Tactility/Source/app/development/Development.cpp
  • Tactility/Source/app/gpssettings/GpsSettings.cpp
  • Tactility/Source/app/grovesettings/GroveSettings.cpp
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp
  • Tactility/Source/app/kerneldisplay/KernelDisplay.cpp
  • Tactility/Source/app/keyboard/KeyboardSettings.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/localesettings/LocaleSettings.cpp
  • Tactility/Source/app/notes/Notes.cpp
  • Tactility/Source/app/power/Power.cpp
  • Tactility/Source/app/poweroff/PowerOff.cpp
  • Tactility/Source/app/screenshot/Screenshot.cpp
  • Tactility/Source/app/settings/Settings.cpp
  • Tactility/Source/app/setup/Setup.cpp
  • Tactility/Source/app/systeminfo/SystemInfo.cpp
  • Tactility/Source/app/timedatesettings/TimeDateSettings.cpp
  • Tactility/Source/app/timezone/TimeZone.cpp
  • Tactility/Source/app/touchcalibration/TouchCalibration.cpp
  • Tactility/Source/app/trackball/TrackballSettings.cpp
  • Tactility/Source/app/usbsettings/UsbSettings.cpp
  • Tactility/Source/app/webserversettings/WebServerSettings.cpp
  • Tactility/Source/app/wifimanage/View.cpp
  • Tactility/Source/app/wifimanage/WifiManage.cpp
  • Tactility/Source/file/FileMutexLvgl.cpp
  • Tactility/Source/lvgl/LvglSync.cpp
  • Tactility/Source/lvgl/SliderBox.cpp
  • Tactility/Source/lvgl/Statusbar.cpp
  • Tactility/Source/lvgl/Toolbar.cpp
  • Tactility/Source/lvgl/wrappers/button.cpp
  • Tactility/Source/lvgl/wrappers/dropdown.cpp
  • Tactility/Source/lvgl/wrappers/list.cpp
  • Tactility/Source/lvgl/wrappers/obj.cpp
  • Tactility/Source/lvgl/wrappers/switch.cpp
  • Tactility/Source/lvgl/wrappers/textarea.cpp
  • Tactility/Source/service/displayidle/DisplayIdle.cpp
  • Tactility/Source/service/gui/GuiService.cpp
  • Tactility/Source/service/keyboardidle/KeyboardIdle.cpp
  • Tactility/Source/service/memorychecker/MemoryCheckerService.cpp
  • Tactility/Source/service/statusbar/Statusbar.cpp
  • Tactility/Source/service/webserver/WebServerService.cpp
  • Tactility/Source/service/wifi/WifiApSettings.cpp
  • Tests/SdkIntegration/main/Source/main.c
  • Tests/crypt-module/Source/CryptTest.cpp
  • Tests/crypt-module/Source/HashTest.cpp
💤 Files with no reviewable changes (1)
  • Modules/lvgl-module/include/lvgl/lvgl.h

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Tactility/Source/app/gpssettings/GpsSettings.cpp (1)

178-208: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Only unlock after successfully acquiring the LVGL mutex.

When lvgl_try_lock() times out, the unconditional lvgl_unlock() at line 208 is still executed. Both LVGL unlock implementations call down to the underlying unlock primitive when initialized, so this can violate mutex ownership and hit a mutex assertion or corrupt synchronization state.

Proposed fix
         if (lvgl_try_lock(100 / portTICK_PERIOD_MS)) {
             for (auto& row : deviceRows) {
                 // ...
             }
+            lvgl_unlock();
         }
-        lvgl_unlock();
🧹 Nitpick comments (3)
Modules/crypt-module/source/module.cpp (1)

2-3: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include the public module header in its implementation.

module.cpp defines crypt_module but does not include <crypt/module.h>, so the new export declaration is not checked against its definition. Include the module header while retaining <tactility/module.h> for the complete type definition.

Proposed include update
 `#include` <crypt/crypt.h>
 `#include` <crypt/hash.h>
+#include <crypt/module.h>
 `#include` <tactility/module.h>
Modules/lvgl-module/include/lvgl/lvgl_fonts.h (1)

17-27: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use (void) for no-argument C declarations.

Because this header exposes a C API, declarations such as lvgl_get_shared_icon_font() do not enforce an empty parameter list in C. Change all no-argument getters, and their definitions, to (void).

Proposed fix
-const lv_font_t* lvgl_get_shared_icon_font();
-uint32_t lvgl_get_shared_icon_font_height();
+const lv_font_t* lvgl_get_shared_icon_font(void);
+uint32_t lvgl_get_shared_icon_font_height(void);

-const lv_font_t* lvgl_get_launcher_icon_font();
-uint32_t lvgl_get_launcher_icon_font_height();
+const lv_font_t* lvgl_get_launcher_icon_font(void);
+uint32_t lvgl_get_launcher_icon_font_height(void);

-const lv_font_t* lvgl_get_statusbar_icon_font();
-uint32_t lvgl_get_statusbar_icon_font_height();
+const lv_font_t* lvgl_get_statusbar_icon_font(void);
+uint32_t lvgl_get_statusbar_icon_font_height(void);
Modules/lvgl-module/include/lvgl/lvgl_pointer.h (1)

8-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include the standard types used directly by this public header.

LvglPointerCalibration uses int32_t and the API returns bool, but this header relies on transitive declarations from <lvgl.h>. Add <stdint.h> and <stdbool.h> explicitly.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e75c22ec-964e-4a4a-9edd-cd124a49f0b1

📥 Commits

Reviewing files that changed from the base of the PR and between ca5b071 and 5d6bc6b.

📒 Files selected for processing (87)
  • Devices/lilygo-tdeck-plus/source/module.cpp
  • Devices/lilygo-tdeck/source/module.cpp
  • Devices/lilygo-tlora-pager/source/module.cpp
  • Devices/m5stack-tab5/Source/devices/tab5_keyboard.cpp
  • Modules/crypt-module/include/crypt/crypt.h
  • Modules/crypt-module/include/crypt/hash.h
  • Modules/crypt-module/include/crypt/module.h
  • Modules/crypt-module/source/crypt.cpp
  • Modules/crypt-module/source/hash.cpp
  • Modules/crypt-module/source/module.cpp
  • Modules/gps-module/include/gps/module.h
  • Modules/gps-module/source/module.cpp
  • Modules/lvgl-module/include/lvgl/lvgl.h
  • Modules/lvgl-module/include/lvgl/lvgl_display.h
  • Modules/lvgl-module/include/lvgl/lvgl_fonts.h
  • Modules/lvgl-module/include/lvgl/lvgl_icon_launcher.h
  • Modules/lvgl-module/include/lvgl/lvgl_icon_shared.h
  • Modules/lvgl-module/include/lvgl/lvgl_icon_statusbar.h
  • Modules/lvgl-module/include/lvgl/lvgl_keyboard.h
  • Modules/lvgl-module/include/lvgl/lvgl_pointer.h
  • Modules/lvgl-module/include/lvgl/lvgl_ppa.h
  • Modules/lvgl-module/include/lvgl/module.h
  • Modules/lvgl-module/source/arch/lvgl_esp32.c
  • Modules/lvgl-module/source/arch/lvgl_posix.c
  • Modules/lvgl-module/source/lvgl.c
  • Modules/lvgl-module/source/lvgl_devices.c
  • Modules/lvgl-module/source/lvgl_display.c
  • Modules/lvgl-module/source/lvgl_fonts.c
  • Modules/lvgl-module/source/lvgl_keyboard.c
  • Modules/lvgl-module/source/lvgl_pointer.c
  • Modules/lvgl-module/source/lvgl_ppa.c
  • Modules/lvgl-module/source/module.c
  • Modules/lvgl-module/source/symbols.c
  • Tactility/Source/Tactility.cpp
  • Tactility/Source/app/addgps/AddGps.cpp
  • Tactility/Source/app/apphub/AppHubApp.cpp
  • Tactility/Source/app/applist/AppList.cpp
  • Tactility/Source/app/appsettings/AppSettings.cpp
  • Tactility/Source/app/audiosettings/AudioSettings.cpp
  • Tactility/Source/app/btmanage/BtManage.cpp
  • Tactility/Source/app/btmanage/View.cpp
  • Tactility/Source/app/chat/ChatApp.cpp
  • Tactility/Source/app/chat/ChatSettings.cpp
  • Tactility/Source/app/development/Development.cpp
  • Tactility/Source/app/gpssettings/GpsSettings.cpp
  • Tactility/Source/app/grovesettings/GroveSettings.cpp
  • Tactility/Source/app/i2cscanner/I2cScanner.cpp
  • Tactility/Source/app/kerneldisplay/KernelDisplay.cpp
  • Tactility/Source/app/keyboard/KeyboardSettings.cpp
  • Tactility/Source/app/launcher/Launcher.cpp
  • Tactility/Source/app/localesettings/LocaleSettings.cpp
  • Tactility/Source/app/notes/Notes.cpp
  • Tactility/Source/app/power/Power.cpp
  • Tactility/Source/app/poweroff/PowerOff.cpp
  • Tactility/Source/app/screenshot/Screenshot.cpp
  • Tactility/Source/app/settings/Settings.cpp
  • Tactility/Source/app/setup/Setup.cpp
  • Tactility/Source/app/systeminfo/SystemInfo.cpp
  • Tactility/Source/app/timedatesettings/TimeDateSettings.cpp
  • Tactility/Source/app/timezone/TimeZone.cpp
  • Tactility/Source/app/touchcalibration/TouchCalibration.cpp
  • Tactility/Source/app/trackball/TrackballSettings.cpp
  • Tactility/Source/app/usbsettings/UsbSettings.cpp
  • Tactility/Source/app/webserversettings/WebServerSettings.cpp
  • Tactility/Source/app/wifimanage/View.cpp
  • Tactility/Source/app/wifimanage/WifiManage.cpp
  • Tactility/Source/file/FileMutexLvgl.cpp
  • Tactility/Source/lvgl/LvglSync.cpp
  • Tactility/Source/lvgl/SliderBox.cpp
  • Tactility/Source/lvgl/Statusbar.cpp
  • Tactility/Source/lvgl/Toolbar.cpp
  • Tactility/Source/lvgl/wrappers/button.cpp
  • Tactility/Source/lvgl/wrappers/dropdown.cpp
  • Tactility/Source/lvgl/wrappers/list.cpp
  • Tactility/Source/lvgl/wrappers/obj.cpp
  • Tactility/Source/lvgl/wrappers/switch.cpp
  • Tactility/Source/lvgl/wrappers/textarea.cpp
  • Tactility/Source/service/displayidle/DisplayIdle.cpp
  • Tactility/Source/service/gui/GuiService.cpp
  • Tactility/Source/service/keyboardidle/KeyboardIdle.cpp
  • Tactility/Source/service/memorychecker/MemoryCheckerService.cpp
  • Tactility/Source/service/statusbar/Statusbar.cpp
  • Tactility/Source/service/webserver/WebServerService.cpp
  • Tactility/Source/service/wifi/WifiApSettings.cpp
  • Tests/SdkIntegration/main/Source/main.c
  • Tests/crypt-module/Source/CryptTest.cpp
  • Tests/crypt-module/Source/HashTest.cpp
💤 Files with no reviewable changes (1)
  • Modules/lvgl-module/include/lvgl/lvgl.h
🛑 Comments failed to post (3)
Modules/lvgl-module/include/lvgl/lvgl_pointer.h (1)

51-61: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Keep the default pointer indev valid after removing the first one.

The implementation in Modules/lvgl-module/source/lvgl_pointer.c sets default_pointer_indev = NULL when the current default is removed, even if another lvgl_pointer_add() indev remains. That contradicts this documented “first indev ... that hasn’t been removed” contract. Track the registered indevs or select the next remaining one during removal.

Modules/lvgl-module/source/lvgl.c (1)

2-5: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Fix the missing UiDensity and TT_LVGL_UI_DENSITY definitions.

With the shown includes, this translation unit has no visible complete declaration for enum UiDensity, and TT_LVGL_UI_DENSITY is undeclared. Clang reports both errors, preventing the LVGL module from compiling. Include the header that owns UiDensity and ensure the density configuration header/definition is attached to this CMake target.

🧰 Tools
🪛 Clang (14.0.6)

[error] 4-4: incomplete result type 'enum UiDensity' in function definition

(clang-diagnostic-error)


[error] 5-5: use of undeclared identifier 'TT_LVGL_UI_DENSITY'

(clang-diagnostic-error)

Source: Linters/SAST tools

Tactility/Source/app/development/Development.cpp (1)

34-37: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Repository files matching Development.cpp:"
fd -a 'Development\.cpp$' . || true

echo
echo "Search lvgl_is_running/lvgl_lock/lvgl_unlock/updateViewState definitions and usages:"
rg -n "lvgl_is_running|lvgl_lock|lvgl_unlock|updateViewState|lvgl_deinit|lvgl_init" .

echo
echo "Git status/stat:"
git status --short
git diff --stat || true

Repository: TactilityProject/Tactility

Length of output: 6874


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Development.cpp relevant lines:"
sed -n '1,220p' Tactility/Source/app/development/Development.cpp | cat -n

echo
echo "LvglModule source outlines/lines:"
for f in Tactility/Modules/lvgl-module/source/module.c Tactility/Modules/lvgl-module/source/arch/lvgl_posix.c Tactility/Modules/lvgl-module/source/arch/lvgl_esp32.c Tactility/Modules/lvgl-module/include/lvgl/lvgl.h; do
  echo "---- $f ----"
  wc -l "$f"
  sed -n '1,180p' "$f" | cat -n
done

Repository: TactilityProject/Tactility

Length of output: 8087


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Find lvgl module files:"
git ls-files | rg 'lvgl-module|Lvgl|lvgl'

echo
echo "Modules directory files:"
find . -path './Tactility/Modules/lvgl-module*' -type f -print | sort

echo
echo "Relevant source files:"
for f in $(git ls-files | rg 'lvgl-module/(source|include)|lvgl_(pos|esp|lock|module)'); do
  echo "---- $f ----"
  wc -l "$f"
  sed -n '1,180p' "$f" | cat -n
done

echo
echo "Search state/run symbols:"
rg -n "running|deinit|init|running_state|deinitialized|mutex|lock|unlock|lv_draw_buf|lv_display" Tactility/Modules/lvgl-module Tactility/Source app Tactility/Include 2>/dev/null | head -200

Repository: TactilityProject/Tactility

Length of output: 50383


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "LVGL module source files relevant to synchronization/state:"
for f in Modules/lvgl-module/source/module.c Modules/lvgl-module/source/arch/lvgl_posix.c Modules/lvgl-module/source/arch/lvgl_esp32.c; do
  echo "---- $f ----"
  wc -l "$f"
  sed -n '1,180p' "$f" | cat -n
done

echo
echo "Development.cpp update/hide block:"
sed -n'33,40p;159,164p' Tactility/Source/app/development/Development.cpp | cat -n

echo
echo "Similar lvgl_is_running usage around updates:"
sed -n '260,295p' Tactility/Source/service/statusbar/Statusbar.cpp | cat -n

echo
echo "Lock definitions with line numbers:"
rg -n -C 5 "void lvgl_(lock|unlock|try_lock)|bool lvgl_is_running" Modules/lvgl-module/source Modules/lvgl-module/include

Repository: TactilityProject/Tactility

Length of output: 11568


Move the running-state check under the LVGL lock.

lvgl_is_running() returns module state separately from the LVGL lock, so LVGL can stop/deinitialize after the check and before lvgl_lock() returns. On POSIX, lvgl_lock() can also return immediately if the mutex is not initialized, leaving updateViewState() to call LVGL APIs unprotected. Acquire the lock first and skip updateViewState() if lvgl_is_running() is false; keep onHide()’s timer.stop() under lock as well.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a3bea0d-8b53-45e1-801b-e5f2dc403c8c

📥 Commits

Reviewing files that changed from the base of the PR and between f519788 and ddef36b.

📒 Files selected for processing (8)
  • Modules/crypt-module/include/crypt/module.h
  • Modules/crypt-module/source/module.cpp
  • Modules/lvgl-module/include/lvgl/lvgl.h
  • Modules/lvgl-module/include/lvgl/lvgl_display.h
  • Modules/lvgl-module/include/lvgl/lvgl_fonts.h
  • Modules/lvgl-module/include/lvgl/lvgl_keyboard.h
  • Modules/lvgl-module/include/lvgl/lvgl_pointer.h
  • Tactility/Source/app/gpssettings/GpsSettings.cpp
🚧 Files skipped from review as they are similar to previous changes (5)
  • Modules/crypt-module/source/module.cpp
  • Modules/lvgl-module/include/lvgl/lvgl_fonts.h
  • Modules/lvgl-module/include/lvgl/lvgl_keyboard.h
  • Modules/lvgl-module/include/lvgl/lvgl.h
  • Modules/lvgl-module/include/lvgl/lvgl_pointer.h

Comment thread Tactility/Source/app/gpssettings/GpsSettings.cpp
@KenVanHoeylandt
KenVanHoeylandt merged commit db7468d into main Jul 25, 2026
67 of 71 checks passed
@KenVanHoeylandt
KenVanHoeylandt deleted the develop branch July 25, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant