BaseUI: Color Support for TFT Nodes#10233
Merged
Merged
Conversation
* TFT-color work * TLora Pager build fix --------- Co-authored-by: Jason P <applewiz@mac.com>
Xaositek
approved these changes
Apr 22, 2026
Xaositek
left a comment
Contributor
There was a problem hiding this comment.
Have extensively tested across T114, CardPuter, TDeck, and TLora Pager. Also tested against WisMesh Tag and Wio Tracker L1 for any regressions in OLED and non-screen devices.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds true-color rendering support for TFT devices by introducing a theme/role-based color system with runtime color regions, updating multiple UI renderers to register color roles, and adjusting TFT refresh behavior to reduce artifacts while keeping non-TFT devices on the existing monochrome pipeline.
Changes:
- Introduces a TFT theme engine (palette + roles + runtime color regions) and updates UI components (header/footer, nav bar, compasses, message bubbles, notifications, node list) to register color regions/roles.
- Updates TFT display refresh logic to support per-pixel role color resolution and full-frame repaints when theme/region layouts change.
- Adds a new motion sensor abstraction + sensor drivers and an
AccelerometerThreadto unify wake/compass/calibration behavior across accelerometers.
Reviewed changes
Copilot reviewed 34 out of 54 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| variants/nrf52840/heltec_mesh_solar/platformio.ini | Bumps ST7789 dependency to a commit that supports runtime color regions. |
| variants/nrf52840/heltec_mesh_node_t114/variant.h | Removes per-variant TFT mesh color override in favor of theme system. |
| variants/nrf52840/heltec_mesh_node_t114/platformio.ini | Bumps ST7789 dependency to match new color-region support. |
| variants/esp32s3/unphone/variant.h | Increases UI transition framerate for smoother TFT transitions. |
| variants/esp32s3/tracksenger/oled/variant.h | Removes TFT mesh color override (aligns with new theme/role system). |
| variants/esp32s3/tracksenger/lcd/variant.h | Removes TFT mesh color override (aligns with new theme/role system). |
| variants/esp32s3/tracksenger/internal/variant.h | Removes TFT mesh color override (aligns with new theme/role system). |
| variants/esp32s3/tlora-pager/variant.h | Increases UI transition framerate for smoother TFT transitions. |
| variants/esp32s3/t-deck/variant.h | Increases UI transition framerate for smoother TFT transitions. |
| variants/esp32s3/station-g2/variant.h | Adds new Station G2 board variant definition. |
| variants/esp32s3/station-g2/platformio.ini | Adds PlatformIO env/metadata for Station G2. |
| variants/esp32s3/station-g2/pins_arduino.h | Adds Arduino pin mapping header for Station G2. |
| variants/esp32s3/seeed-sensecap-indicator/variant.h | Increases UI transition framerate for smoother TFT transitions. |
| variants/esp32s3/picomputer-s3/variant.h | Increases UI transition framerate and removes TFT mesh override. |
| variants/esp32s3/m5stack_cardputer_adv/platformio.ini | Bumps ST7789 dependency to match new color-region support. |
| variants/esp32s3/heltec_vision_master_t190/platformio.ini | Bumps ST7789 dependency to match new color-region support. |
| variants/esp32s3/heltec_v4/platformio.ini | Increases UI transition framerate; retains existing touch lib pin. |
| src/sleep.cpp | Adjusts CPU fast-path conditions for specific TFT-ish boards. |
| src/motion/STK8XXXSensor.h | Adds STK8XXX motion sensor wrapper/stub. |
| src/motion/STK8XXXSensor.cpp | Implements STK8XXX wake-on-motion interrupt handling. |
| src/motion/MotionSensor.h | Adds shared MotionSensor base (wake/button/calibration hooks). |
| src/motion/MotionSensor.cpp | Implements shared compass calibration persistence + UI drawing. |
| src/motion/MPU6050Sensor.h | Adds MPU6050 motion sensor wrapper. |
| src/motion/MPU6050Sensor.cpp | Implements MPU6050 motion detection for wake. |
| src/motion/LSM6DS3Sensor.h | Adds LSM6DS3 motion sensor wrapper. |
| src/motion/LSM6DS3Sensor.cpp | Implements LSM6DS3 shake/wakeup behavior. |
| src/motion/LIS3DHSensor.h | Adds LIS3DH motion sensor wrapper. |
| src/motion/LIS3DHSensor.cpp | Implements LIS3DH click/double-tap handling. |
| src/motion/ICM20948Sensor.h | Adds ICM20948 singleton + sensor wrapper with calibration support. |
| src/motion/ICM20948Sensor.cpp | Implements ICM20948 wake-on-motion + optional heading/calibration. |
| src/motion/BMX160Sensor.h | Adds BMX160 wrapper with stub fallback when library absent. |
| src/motion/BMX160Sensor.cpp | Implements BMX160 heading + calibration persistence integration. |
| src/motion/BMA423Sensor.h | Adds BMA423 wrapper (tilt/double-tap wake). |
| src/motion/BMA423Sensor.cpp | Implements BMA423 init + IRQ polling logic. |
| src/motion/AccelerometerThread.h | Adds thread that selects/owns the detected motion sensor driver. |
| src/graphics/draw/UIRenderer.h | Adds TFT-aware boot icon screen entry point. |
| src/graphics/draw/UIRenderer.cpp | Adds TFT compass rendering + more role/region registrations across screens. |
| src/graphics/draw/NotificationRenderer.cpp | Registers action menu regions and adds TFT color roles for banners. |
| src/graphics/draw/NodeListRenderer.cpp | Adds favorite-node highlighting and signal-bar role registration on TFT. |
| src/graphics/draw/MessageRenderer.cpp | Adds bubble-fill role logic (including rounded-region registration) for TFT themes. |
| src/graphics/draw/MenuHandler.h | Replaces TFT color picker menu with Theme menu entry. |
| src/graphics/draw/MenuHandler.cpp | Removes RGB picker and adds theme picker wiring/persistence. |
| src/graphics/draw/DebugRenderer.cpp | Adds TFT utilization-fill role registration and bar sizing adjustments. |
| src/graphics/draw/CompassRenderer.h | Adds protobuf include to support compass mode enums. |
| src/graphics/draw/CompassRenderer.cpp | Refactors compass label math and arrow drawing implementation. |
| src/graphics/draw/ClockRenderer.cpp | Updates header calls and clears analog clock frame to reduce artifacts. |
| src/graphics/TFTPalette.h | Adds shared RGB565 palette and helpers (including contrast picker). |
| src/graphics/TFTDisplay.h | Adds repaint chunk buffer for full-frame color repaints. |
| src/graphics/TFTDisplay.cpp | Implements theme-aware TFT rendering, region-based color resolve, and repaint strategy. |
| src/graphics/TFTColorRegions.h | Introduces color-region + theme engine APIs and role definitions. |
| src/graphics/TFTColorRegions.cpp | Implements region storage, per-role colors, theme table, and pixel color resolve. |
| src/graphics/SharedUIDisplay.h | Extends drawCommonHeader signature to support theme-based styling. |
| src/graphics/SharedUIDisplay.cpp | Implements TFT role coloring for header/footer and updates sanitization logic. |
| src/graphics/Screen.cpp | Adds per-frame region preparation and routes boot splash through TFT-aware renderer. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/2c232b6b-0213-4382-9e23-171b092ae620 Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
thebentern
approved these changes
Apr 26, 2026
mariotti
pushed a commit
to mariotti/firmware
that referenced
this pull request
May 6, 2026
* True Colors on TFT (Heltec Mesh Node T114, Heltec Vision Master T190, CardPuter Adv, T-Deck, T-Lora Pager) * Theme support - New and some Classic Themes! * Colored Compass --------- Co-authored-by: Jason P <applewiz@mac.com> Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
True TFT Colors: New Themes + Colored UI for BaseUI
This PR brings a visual upgrade to supported TFT node by adding true color aware UI rendering while keeping the experience stable/unchanged on non-TFT screens like OLED and Eink devices.
What’s new
Device support in this PR
Compatibility
20260422_002231_1.1.mp4