T-Echo-Card support#10267
Conversation
There was a problem hiding this comment.
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-cardnRF52840 variant (pins, early power sequencing, PlatformIO env). - Introduced
OLED_TINYand migrated priorM5STACK_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. |
There was a problem hiding this comment.
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-cardnRF52840 variant (pins, early power-rail reset sequencing, PlatformIO env). - Introduce
OLED_TINYflag and migrate multiple UI/layout conditionals fromM5STACK_UNITC6LtoOLED_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 |
Xaositek
left a comment
There was a problem hiding this comment.
Looks solid! Testing on a C6L showed no regressions
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.
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>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
|
@copilot this PR was originally against develop. Rebase clean against master. |
Merged |
I can’t safely complete that from this automation path because it requires rewriting published branch history ( |
# Conflicts: # src/graphics/draw/UIRenderer.cpp
# Conflicts: # src/graphics/draw/UIRenderer.cpp
No description provided.