Skip to content

Conversation

@KenVanHoeylandt
Copy link
Contributor

@KenVanHoeylandt KenVanHoeylandt commented Feb 9, 2026

Summary by CodeRabbit

  • New Features

    • Runtime gating to enable LilyGO T-Deck specific apps and services
    • New device compatibility and model-detection APIs
    • Added a buffer-overflow error code and message
  • Chores

    • Updated GitHub Actions checkout to v4
    • Adjusted an LVGL-related library version
    • Device config now emits a T-Deck workaround flag when applicable
    • Removed internal developer comments and minor cleanups

@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

📝 Walkthrough

Walkthrough

Updates GitHub Actions checkout steps to actions/checkout@v4. Removes minor comments in several device Display.cpp files and adjusts Gt911Touch construction for lilygo-tdeck. Adds runtime gating for T‑Deck features via CONFIG_TT_TDECK_WORKAROUND, a Kconfig symbol, and device.py now emits the flag for lilygo-tdeck. Introduces device_is_compatible() and root_is_model() APIs and exports them in kernel symbols. Adds ERROR_BUFFER_OVERFLOW and its string. Changes Firmware/idf_component.yml to espressif/esp_lvgl_port v2.5.0.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Merge develop into main' accurately describes the pull request's primary objective of merging the develop branch into main.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • 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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
Devices/lilygo-tdeck/Source/devices/Display.cpp (1)

8-17: Constructor parameters are in correct order, but inline comments would improve readability.

Parameter order confirmed as correct: mirrorY (false), pinReset (GPIO_NUM_NC), pinInterrupt (GPIO_NUM_16). However, with 8 positional arguments, a brief inline comment such as /* mirrorY */ false would reduce the risk of misconfigurations during future maintenance, especially since the semantic meaning of each parameter isn't immediately obvious from the values alone.

TactilityKernel/Source/drivers/root.cpp (1)

9-12: Parameter name mismatch with header declaration; missing <cstring> include.

The header (root.h) declares the parameter as model, but the implementation uses buffer. Align naming for clarity. Also, strcmp is used without an explicit include — add <cstring> (or <string.h> for C linkage context).

Proposed fix
+#include <cstring>
+
 extern "C" {
 
-bool root_is_model(const struct Device* device, const char* buffer) {
+bool root_is_model(const struct Device* device, const char* model) {
     auto* config = static_cast<const RootConfig*>(device->config);
-    return strcmp(config->model, buffer) == 0;
+    return strcmp(config->model, model) == 0;
 }
Tactility/Source/Tactility.cpp (1)

161-167: Consider extracting the duplicated root device lookup and model string.

The pattern device_find_by_name("/") + check() + root_is_model(…, "LilyGO T-Deck") is duplicated. A small helper or a shared constant for the model string would reduce repetition and the risk of typo-induced bugs if more T-Deck conditionals are added later.

Example helper
// Near top of file or in a shared header
static constexpr const char* TDECK_MODEL = "LilyGO T-Deck";

static bool isCurrentDeviceModel(const char* model) {
    auto* root_device = device_find_by_name("/");
    check(root_device);
    return root_is_model(root_device, model);
}

Also applies to: 255-260

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
TactilityKernel/Source/drivers/root.cpp (1)

10-13: Parameter name mismatch with header declaration.

The header (root.h Line 21) declares the second parameter as model, but the implementation names it buffer. Use model for consistency and clarity — it better describes the parameter's purpose.

Proposed fix
-bool root_is_model(const struct Device* device, const char* buffer) {
+bool root_is_model(const struct Device* device, const char* model) {
     auto* config = static_cast<const RootConfig*>(device->config);
-    return strcmp(config->model, buffer) == 0;
+    return strcmp(config->model, model) == 0;
 }

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
device.py (1)

108-110: Consider making the workaround flag data-driven instead of hardcoded.

Hardcoding "lilygo-tdeck" ties the build script to a specific device string. If another device needs this workaround or the device ID changes, this must be manually updated. Since device.properties already drives all other config emissions, you could add a property like tdeckWorkaround=true in the T-Deck's device.properties and read it here with get_boolean_property_or_false.

That said, I understand this is a temporary workaround per the Kconfig comments, so this is fine to defer.

Firmware/Kconfig (1)

9-15: Minor indentation inconsistency.

The new config TT_TDECK_WORKAROUND block and its children use 5-space indentation (lines 9–14), while the surrounding entries (TT_DEVICE_NAME, TT_DEVICE_ID, TT_SPLASH_DURATION) use 4-space indentation. Consider aligning to keep the file consistent.

Proposed fix
-     # T-Deck device-related code was directly referenced from Tactility in a pull request.
-     # This breaks other devices because the code does not exist in those implementations.
-     # Until we move it out into a proper driver, we have to have pre-processor definition for that.
-     config TT_TDECK_WORKAROUND
-         bool "Temporary work-around until we fix the T-Deck keyboard and trackball settings"
-         default n
-     config TT_SPLASH_DURATION
+    # T-Deck device-related code was directly referenced from Tactility in a pull request.
+    # This breaks other devices because the code does not exist in those implementations.
+    # Until we move it out into a proper driver, we have to have pre-processor definition for that.
+    config TT_TDECK_WORKAROUND
+        bool "Temporary work-around until we fix the T-Deck keyboard and trackball settings"
+        default n
+    config TT_SPLASH_DURATION
Tactility/Source/Tactility.cpp (2)

114-117: Inconsistent preprocessor guard style for CONFIG_TT_TDECK_WORKAROUND.

Three different guard styles are used for the same config symbol:

  • Line 114: #if CONFIG_TT_TDECK_WORKAROUND == 1
  • Line 163: #if defined(CONFIG_TT_TDECK_WORKAROUND)
  • Line 254: #if defined(CONFIG_TT_TDECK_WORKAROUND)

While functionally equivalent in ESP-IDF (bool n leaves the macro undefined), mixing styles is confusing and error-prone if the generation behavior ever changes. Pick one form and use it consistently.

Proposed fix — unify to `#if defined(CONFIG_TT_TDECK_WORKAROUND)`
 `#ifdef` ESP_PLATFORM
     namespace crashdiagnostics { extern const AppManifest manifest; }
     namespace webserversettings { extern const AppManifest manifest; }
-#if CONFIG_TT_TDECK_WORKAROUND == 1
+#if defined(CONFIG_TT_TDECK_WORKAROUND)
     namespace keyboardsettings { extern const AppManifest manifest; } // T-Deck only for now
     namespace trackballsettings { extern const AppManifest manifest; } // T-Deck only for now
 `#endif`

Also applies to: 163-166, 254-256


163-166: Extra indentation on guarded addAppManifest calls.

Lines 164–165 use 8-space indentation while all surrounding addAppManifest calls use 4-space indentation. This appears to be an accidental whitespace change.

Proposed fix
 `#if` defined(CONFIG_TT_TDECK_WORKAROUND)
-        addAppManifest(app::keyboardsettings::manifest);
-        addAppManifest(app::trackballsettings::manifest);
+    addAppManifest(app::keyboardsettings::manifest);
+    addAppManifest(app::trackballsettings::manifest);
 `#endif`

@KenVanHoeylandt KenVanHoeylandt merged commit 25c3f19 into main Feb 9, 2026
53 checks passed
@KenVanHoeylandt KenVanHoeylandt deleted the develop branch February 9, 2026 21:12
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