Skip to content

BaseUI: Color Support for TFT Nodes#10233

Merged
Xaositek merged 90 commits into
developfrom
TrueTFTColors
Apr 26, 2026
Merged

BaseUI: Color Support for TFT Nodes#10233
Xaositek merged 90 commits into
developfrom
TrueTFTColors

Conversation

@HarukiToreda

Copy link
Copy Markdown
Contributor

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

  • Added ST7789 support for runtime color regions so different parts of the UI can have their own colors.
  • Introduced multiple color themes, including Default Dark and Default Light, plus classic color styles. Created by @Xaositek
  • Applied color updates across key UI areas like:
    • headers and status areas
    • navigation bar and arrows
    • signal and utilization bars
    • notification/action popups
    • favorite node highlighting
    • boot splash styling
  • Improved screen refresh behavior to reduce visual artifacts and keep updates feeling smooth.

Device support in this PR

  • Heltec Mesh Node T114
  • Heltec Vision Master T190
  • CardPuter Adv
  • T-Deck
  • T-Lora Pager

Compatibility

  • Maintains backward compatibility with EInk and OLED devices.
  • Existing behavior is preserved for non-TFT targets.
  • Theme/color features are scoped to supported TFT paths.
20260422_002231_1.1.mp4

HarukiToreda and others added 30 commits February 20, 2026 20:36
* TFT-color work

* TLora Pager build fix

---------

Co-authored-by: Jason P <applewiz@mac.com>

@Xaositek Xaositek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 AccelerometerThread to 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.

Comment thread src/graphics/TFTColorRegions.h Outdated
Comment thread src/graphics/TFTColorRegions.cpp
Comment thread src/graphics/draw/MenuHandler.cpp
Comment thread src/graphics/draw/UIRenderer.cpp Outdated
Comment thread src/graphics/Screen.cpp Outdated
Comment thread src/graphics/draw/ClockRenderer.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xaositek and others added 3 commits April 22, 2026 11:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI requested a review from thebentern April 22, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 34 out of 54 changed files in this pull request and generated no new comments.

@Xaositek Xaositek merged commit 8dde4ee into develop Apr 26, 2026
78 checks passed
@Xaositek Xaositek deleted the TrueTFTColors branch April 26, 2026 12:45
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>
@NomDeTom NomDeTom mentioned this pull request May 12, 2026
58 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.8 baseui Issues directly related to BaseUI cleanup Code cleanup or refactor device-screen Device Screen Enhancements enhancement New feature or request

Projects

None yet

6 participants