Skip to content

T-Echo-Card support#10267

Merged
caveman99 merged 20 commits into
developfrom
t-echo-card
May 19, 2026
Merged

T-Echo-Card support#10267
caveman99 merged 20 commits into
developfrom
t-echo-card

Conversation

@caveman99

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added needs-review Needs human review hardware-support Hardware related: new devices or modules, problems specific to hardware labels Apr 23, 2026
@caveman99 caveman99 added requires-protos Requires changes to protobufs to work requires-docs Documentation must be updated device-screen Device Screen Enhancements triaged Reviewed by the team, has enough information and ready to work on now. baseui Issues directly related to BaseUI and removed needs-review Needs human review labels Apr 23, 2026

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

Adds initial firmware support for the LilyGo T-Echo-Card (nRF52840) variant, including OLED-specific layout handling and WS2812-based status/notification LEDs, while generalizing “tiny OLED” UI behavior across the graphics/BLE UI stack.

Changes:

  • Added a new t-echo-card nRF52840 variant (pins, early power sequencing, PlatformIO env).
  • Introduced OLED_TINY and migrated prior M5STACK_UNITC6L-specific tiny-screen UI conditionals to the new macro.
  • Added NeoPixel (WS2812) support for power/pairing status LEDs and the external notification LED, plus per-variant OLED geometry override and vertical page offset support.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
variants/nrf52840/t-echo-card/variant.h New board pinmap + WS2812 status roles + OLED geometry/y-offset defines + early power/GPS/buzzer pin definitions.
variants/nrf52840/t-echo-card/variant.cpp New nRF52 variant pin map + earlyInitVariant() power-rail toggle and peripheral parking at boot.
variants/nrf52840/t-echo-card/platformio.ini New t-echo-card build env (PRIVATE_HW, include path, build filter).
variants/esp32c6/m5stack_unitc6l/variant.h Defines OLED_TINY for the existing tiny OLED board.
src/nimble/NimbleBluetooth.cpp Uses OLED_TINY to simplify BLE pairing screen text for small displays.
src/modules/StatusLEDModule.h / .cpp Adds optional WS2812 power/pairing pixels and updates run loop to drive them.
src/modules/ExternalNotificationModule.h / .cpp Adds optional WS2812 notification pixel support and initializes it when enabled.
src/mesh/NodeDB.cpp Enables External Notification module by default when WS2812 notification pin is present.
src/main.cpp Adds OLED_GEOMETRY_OVERRIDE hook to override SSD1306 geometry per variant.
src/graphics/images.h Uses OLED_TINY to select small vs normal icon assets.
src/graphics/draw/*.cpp, src/graphics/SharedUIDisplay.cpp, src/graphics/ScreenFonts.h, src/graphics/Screen.cpp Migrates tiny-OLED conditionals to OLED_TINY; adds SSD1306 setYOffset() call when OLED_Y_OFFSET_PAGES is defined.
platformio.ini Bumps the pinned meshtastic/esp8266-oled-ssd1306 library revision.

Comment thread variants/nrf52840/t-echo-card/variant.h Outdated
Comment thread variants/nrf52840/t-echo-card/platformio.ini Outdated
Comment thread src/graphics/Screen.cpp

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

Adds a new nRF52840 hardware variant (LilyGo T-Echo-Card) and generalizes “tiny OLED” UI/layout behavior (previously hard-coded to M5Stack Unit C6L) via an OLED_TINY feature flag, including support for vertically-offset micro OLED panels and WS2812-based status/notification LEDs.

Changes:

  • Add t-echo-card nRF52840 variant (pins, early power-rail reset sequencing, PlatformIO env).
  • Introduce OLED_TINY flag and migrate multiple UI/layout conditionals from M5STACK_UNITC6L to OLED_TINY.
  • Add WS2812 (NeoPixel) support for status/pairing/notification LEDs; add SSD1306 vertical page-offset support and bump the SSD1306 library dependency.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
variants/nrf52840/t-echo-card/variant.h New T-Echo-Card pin map, tiny OLED geometry + Y-offset, WS2812 status LED pin roles
variants/nrf52840/t-echo-card/variant.cpp New variant pin map + earlyInitVariant() power-rail reset/parking sequence
variants/nrf52840/t-echo-card/platformio.ini New t-echo-card PlatformIO environment
variants/esp32c6/m5stack_unitc6l/variant.h Define OLED_TINY for UnitC6L
src/nimble/NimbleBluetooth.cpp Use OLED_TINY to simplify pairing-code screen layout for tiny displays
src/modules/StatusLEDModule.h Add optional NeoPixel-backed power/pairing LED members and defaults
src/modules/StatusLEDModule.cpp Initialize NeoPixels; render power/pairing states to WS2812 pixels
src/modules/ExternalNotificationModule.h Add optional NeoPixel-backed notification LED member and defaults
src/modules/ExternalNotificationModule.cpp Drive notification WS2812 when toggling notification state
src/mesh/NodeDB.cpp Enable ExternalNotification by default when WS2812 notification pin is present
src/main.cpp Allow per-variant OLED geometry override via OLED_GEOMETRY_OVERRIDE
src/graphics/images.h Switch to small icon asset when OLED_TINY
src/graphics/draw/UIRenderer.cpp Replace UnitC6L-specific tiny-OLED logic with OLED_TINY
src/graphics/draw/NotificationRenderer.cpp Replace UnitC6L-specific tiny-OLED logic with OLED_TINY
src/graphics/draw/NodeListRenderer.cpp Replace UnitC6L-specific tiny-OLED logic with OLED_TINY
src/graphics/draw/MenuHandler.cpp Use OLED_TINY to reduce clock menu options for tiny displays
src/graphics/draw/DebugRenderer.cpp Use OLED_TINY to simplify debug screen content for tiny displays
src/graphics/SharedUIDisplay.cpp Use OLED_TINY to adjust header rendering for tiny displays
src/graphics/ScreenFonts.h Key font-size selection off OLED_TINY
src/graphics/Screen.cpp Apply OLED_Y_OFFSET_PAGES via SSD1306Wire Y-offset; update several OLED_TINY conditionals
platformio.ini Bump meshtastic SSD1306 library dependency revision

Comment thread variants/nrf52840/t-echo-card/variant.h Outdated
Comment thread src/modules/StatusLEDModule.cpp Outdated

@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.

Looks solid! Testing on a C6L showed no regressions

pelgraine added a commit to pelgraine/Meck that referenced this pull request Apr 25, 2026
Incorporates hardware-specific learnings from caveman99's Meshtastic
T-Echo Card support PR (meshtastic/firmware#10267), cross-referenced
against LilyGo's official t_echo_card_config.h pinmap.

Battery (critical):
- Add BATTERY_MEASUREMENT_CONTROL pin P0.31 — gates the resistive
  voltage divider feeding AIN0. Without toggling this pin, battery
  ADC reads are invalid (floating divider input).
- TechoCardBoard::getBatteryVoltage() now drives P0.31 HIGH before
  SAADC read and LOW after to avoid parasitic drain.

Display (critical):
- Add OLED_DISPLAY_OFFSET = 24 for the SSD1315 72×40 panel. The
  physical display is mapped at GDDRAM pages 3–7 (rows 24–63);
  SETDISPLAYOFFSET and SETMULTIPLEX commands are sent after
  display.begin() in target.cpp to shift the visible window.

Power rail (high priority):
- RT9080 3V3 LDO now gets a clean HIGH→LOW→HIGH reset cycle with
  100ms dwell in board.begin(), preventing brown-out when LoRa TX
  fires at +22 dBm after a soft reset.
github-actions Bot and others added 12 commits May 14, 2026 06:43
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
)

* Fix position precision for direct sends

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Clarify zero position precision logging

* Use const channel reference for position precision

* Use C linkage for position precision test entrypoints

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Removed comment about setYOffset() patch requirement for OLED.
Removed debug logging statements from handleStatusUpdate method.
Removed comments and cleaned up the variant.h file for the LilyGo T-Echo-Card.
Removed notes about OLED dependencies and patching.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@caveman99 caveman99 marked this pull request as ready for review May 18, 2026 20:18
@caveman99 caveman99 changed the base branch from develop to master May 18, 2026 20:59
caveman99 and others added 4 commits May 18, 2026 23:00
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
@caveman99

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
@caveman99

Copy link
Copy Markdown
Member Author

@copilot this PR was originally against develop. Rebase clean against master.

Copilot AI commented May 19, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merged master into this branch and resolved the conflicts in commit 4f9d03b.

Copilot AI commented May 19, 2026

Copy link
Copy Markdown
Contributor

@copilot this PR was originally against develop. Rebase clean against master.

I can’t safely complete that from this automation path because it requires rewriting published branch history (rebase + force-push), and this environment can only do regular pushes. If you want, I can proceed once force-push is enabled for this branch (or you can run the rebase/force-push and I’ll handle any follow-up conflicts).

@caveman99 caveman99 changed the base branch from master to develop May 19, 2026 05:33
@caveman99 caveman99 merged commit 1747e2d into develop May 19, 2026
26 of 67 checks passed
caveman99 added a commit that referenced this pull request May 19, 2026
# Conflicts:
#	src/graphics/draw/UIRenderer.cpp
@caveman99 caveman99 deleted the t-echo-card branch May 19, 2026 09:23
@vidplace7 vidplace7 mentioned this pull request May 19, 2026
8 tasks
Evil8it pushed a commit to Evil8it/ME4TACTNK that referenced this pull request Jun 10, 2026
# Conflicts:
#	src/graphics/draw/UIRenderer.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

baseui Issues directly related to BaseUI device-screen Device Screen Enhancements hardware-support Hardware related: new devices or modules, problems specific to hardware requires-docs Documentation must be updated requires-protos Requires changes to protobufs to work triaged Reviewed by the team, has enough information and ready to work on now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants