Skip to content

Fixes and improvements - #620

Merged
KenVanHoeylandt merged 14 commits into
mainfrom
develop
Aug 23, 2026
Merged

Fixes and improvements#620
KenVanHoeylandt merged 14 commits into
mainfrom
develop

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Aug 22, 2026

Copy link
Copy Markdown
Contributor
  • Standardized keyboard input using Unicode-based key codes across supported devices and the simulator. Keyboards don't emit LV_KEY_* anymore.
  • Refactored lilygo encoder driver into a reusable GPIO rotary encoder driver (see Drivers/gpio-encoder-module/). Added more features to the config file.
  • Improved LVGL keyboard device management, including duplicate prevention and reliable reconnects.
  • LVGL file mutex now registers with lvgl start/stop
  • Improved LVGL startup/shutdown stability and memory allocation reliability.
  • Increased simulator LVGL memory capacity and improved USB device-class handling.

- custom lvgl alloc
- keyboard drivers now uses codepoints only (no more hardwired LV_KEY_*)
- fix lvgl file lock when lvgl is stopped
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change standardizes keyboard input around Unicode codepoints and adds LVGL translation at the input boundary. Device keymaps and keyboard drivers update Enter, navigation, and control mappings. LVGL gains a custom memory backend with ESP32 fallback handling and whole-archive configuration. File-mutex registration now uses synchronized IDs with explicit cleanup. LVGL startup and shutdown manage mutex resources and keyboard devices. A generic GPIO encoder module replaces the T-Pager-specific implementation. Statusbar subscription ordering changes, and one boot log message is removed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is generic and does not identify the main changes, which include keyboard codepoint migration, LVGL allocator updates, and GPIO encoder replacement. Replace the title with a concise summary of the primary changes, such as “Migrate keyboard input to codepoints and replace the T-Pager encoder driver.”
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 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: 6


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c220b4e-a7ab-40c4-944b-8f8083854484

📥 Commits

Reviewing files that changed from the base of the PR and between 4fea48f and 5707c27.

📒 Files selected for processing (30)
  • Buildscripts/module.cmake
  • Buildscripts/sdkconfig/default.properties
  • Devices/cl32/cl32.dts
  • Devices/lilygo-tdeck-max/lilygo,tdeck-max.dts
  • Devices/lilygo-tdeck-pro/lilygo,tdeck-pro.dts
  • Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts
  • Devices/m5stack-tab5/Source/devices/tab5_keyboard.cpp
  • Devices/simulator/Source/drivers/sdl_input.cpp
  • Drivers/button-control-module/source/button_control.cpp
  • Drivers/m5stack-module/source/cardputer_adv_keyboard.cpp
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp
  • Drivers/tca8418-module/bindings/ti,tca8418.yaml
  • Modules/lvgl-module/CMakeLists.txt
  • Modules/lvgl-module/README.md
  • Modules/lvgl-module/include/lvgl/devices/keyboard.h
  • Modules/lvgl-module/source/devices/keyboard.cpp
  • Modules/lvgl-module/source/lv_mem_custom.c
  • Platforms/platform-esp32/source/drivers/usb/esp32_usbhost_hid.cpp
  • Tactility/Source/Tactility.cpp
  • Tactility/Source/app/boot/Boot.cpp
  • Tactility/Source/file/FileMutexLvgl.cpp
  • Tactility/Source/lvgl/KeyboardDeviceListener.cpp
  • Tactility/Source/lvgl/Statusbar.cpp
  • TactilityKernel/include/tactility/drivers/keyboard.h
  • TactilityKernel/include/tactility/filesystem/file_mutex.h
  • TactilityKernel/source/filesystem/file_mutex.cpp
  • TactilityKernel/source/memory_esp32.cpp
  • TactilityKernel/source/symbols.c
  • TactilityKernel/tests/source/file_mutex_test.cpp
  • lv_conf.h
💤 Files with no reviewable changes (1)
  • Tactility/Source/app/boot/Boot.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread Drivers/tca8418-module/bindings/ti,tca8418.yaml Outdated
Comment thread Modules/lvgl-module/README.md Outdated
Comment thread Modules/lvgl-module/source/devices/keyboard.cpp
Comment thread Tactility/Source/lvgl/Statusbar.cpp
Comment thread TactilityKernel/include/tactility/drivers/keyboard.h
Comment thread TactilityKernel/include/tactility/drivers/keyboard.h Outdated

@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: 2

Caution

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

⚠️ Outside diff range comments (1)
Drivers/tca8418-module/bindings/ti,tca8418.yaml (1)

29-38: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Use a keymap element type that preserves full Unicode codepoints.

If keymap-* must carry all KeyboardKeyData::key values, uint8_t is too narrow. The project defines arrows as U+2190–U+2193 and Home/End as U+21F1–U+21F2. These values cannot survive an 8-bit binding. (raw.githubusercontent.com)

Change the binding and generated driver storage to a 32-bit element type. Otherwise, non-character keys will be truncated or rejected before LVGL translation.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 361903be-3641-4344-93aa-6bd8c0a4adf4

📥 Commits

Reviewing files that changed from the base of the PR and between 5707c27 and 0a2bab4.

📒 Files selected for processing (8)
  • Drivers/m5stack-module/source/cardputer_adv_keyboard.cpp
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp
  • Drivers/tca8418-module/bindings/ti,tca8418.yaml
  • Modules/lvgl-module/README.md
  • Modules/lvgl-module/include/lvgl/devices/keyboard.h
  • Modules/lvgl-module/source/devices/keyboard.cpp
  • Tactility/Source/lvgl/Statusbar.cpp
  • TactilityKernel/include/tactility/drivers/keyboard.h
🚧 Files skipped from review as they are similar to previous changes (2)
  • Modules/lvgl-module/README.md
  • TactilityKernel/include/tactility/drivers/keyboard.h

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread Drivers/m5stack-module/source/cardputer_adv_keyboard.cpp
Comment thread Drivers/m5stack-module/source/cardputer_keyboard.cpp Outdated

@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

Caution

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

⚠️ Outside diff range comments (1)
Drivers/m5stack-module/source/cardputer_keyboard.cpp (1)

257-267: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Use focus-navigation codepoints for Fn group navigation.

CODEPOINT_ARROW_UP and CODEPOINT_ARROW_DOWN are translated by Modules/lvgl-module/source/devices/keyboard.cpp to LV_KEY_UP and LV_KEY_DOWN. Fn+; and Fn+. can therefore toggle widgets such as lv_switch, contrary to this comment’s stated focus-navigation behavior.

Return dedicated focus-navigation codepoints and translate them to the corresponding LVGL focus keys at the LVGL boundary.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c923851-d3dd-4c1d-9b0d-350d5c863d5e

📥 Commits

Reviewing files that changed from the base of the PR and between 0a2bab4 and dc81063.

📒 Files selected for processing (1)
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread Drivers/m5stack-module/source/cardputer_keyboard.cpp

@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: 6

Caution

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

⚠️ Outside diff range comments (1)
TactilityKernel/source/memory_esp32.cpp (1)

31-46: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Normalize zero capability masks before allocation.

When required_caps | desired_caps == 0, ESP-IDF’s heap search finds no heap, so positive-size allocations return nullptr. This affects memory_alloc_with_policy(), memory_calloc_with_policy(), and memory_realloc_with_policy(nullptr, size, ...); desired_caps == 0 prevents the retry. Use MALLOC_CAP_DEFAULT for the initial call when the combined mask is zero, while retaining the optional-capability fallback.

Source: MCP tools


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ca22211-85d5-4901-8363-0942b43ea2c3

📥 Commits

Reviewing files that changed from the base of the PR and between 850f982 and 30271b0.

📒 Files selected for processing (22)
  • Devices/lilygo-tlora-pager/CMakeLists.txt
  • Devices/lilygo-tlora-pager/devicetree.yaml
  • Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts
  • Devices/lilygo-tlora-pager/source/module.cpp
  • Drivers/gpio-encoder-module/CMakeLists.txt
  • Drivers/gpio-encoder-module/LICENSE-Apache-2.0.md
  • Drivers/gpio-encoder-module/bindings/tactility,gpio-encoder.yaml
  • Drivers/gpio-encoder-module/devicetree.yaml
  • Drivers/gpio-encoder-module/include/bindings/gpio_encoder.h
  • Drivers/gpio-encoder-module/include/drivers/gpio_encoder.h
  • Drivers/gpio-encoder-module/include/gpio_encoder_module.h
  • Drivers/gpio-encoder-module/source/gpio_encoder.cpp
  • Drivers/gpio-encoder-module/source/module.cpp
  • Drivers/lilygo-module/bindings/lilygo,tpager-encoder.yaml
  • Drivers/lilygo-module/include/lilygo/bindings/tpager_encoder.h
  • Drivers/lilygo-module/include/lilygo/drivers/tpager_encoder.h
  • Drivers/lilygo-module/include/lilygo/drivers/tpager_encoder_input.h
  • Drivers/lilygo-module/source/module.cpp
  • Drivers/lilygo-module/source/tpager_encoder_input.cpp
  • Modules/lvgl-module/source/devices/keyboard.cpp
  • TactilityKernel/source/memory_esp32.cpp
  • device.py
💤 Files with no reviewable changes (6)
  • Drivers/lilygo-module/source/module.cpp
  • Drivers/lilygo-module/bindings/lilygo,tpager-encoder.yaml
  • Drivers/lilygo-module/include/lilygo/bindings/tpager_encoder.h
  • Drivers/lilygo-module/include/lilygo/drivers/tpager_encoder.h
  • Drivers/lilygo-module/include/lilygo/drivers/tpager_encoder_input.h
  • Drivers/lilygo-module/source/tpager_encoder_input.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread Drivers/gpio-encoder-module/bindings/tactility,gpio-encoder.yaml
Comment thread Drivers/gpio-encoder-module/CMakeLists.txt
Comment thread Drivers/gpio-encoder-module/include/drivers/gpio_encoder.h
Comment thread Drivers/gpio-encoder-module/source/gpio_encoder.cpp Outdated
Comment thread Drivers/gpio-encoder-module/source/gpio_encoder.cpp
Comment thread TactilityKernel/source/memory_esp32.cpp Outdated
@KenVanHoeylandt
KenVanHoeylandt merged commit db48dfe into main Aug 23, 2026
63 checks passed
@KenVanHoeylandt
KenVanHoeylandt deleted the develop branch August 23, 2026 15:21
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