Skip to content

Fix power fade and enhance usermod functionality#5743

Closed
dubpixel wants to merge 10 commits into
wled:mainfrom
dubpixel:bugfix/power-fade
Closed

Fix power fade and enhance usermod functionality#5743
dubpixel wants to merge 10 commits into
wled:mainfrom
dubpixel:bugfix/power-fade

Conversation

@dubpixel

@dubpixel dubpixel commented Jul 18, 2026

Copy link
Copy Markdown

Address issues with power fade functionality and improve the dpx_matrix usermod by adding new features, fixing bugs, and enhancing stability. The changes include updates to the first boot configuration, improved MQTT and OSC support, and various fixes to the web UI and effect registration. Documentation has also been updated to reflect these changes.

Summary by CodeRabbit

  • New Features
    • Added custom Ulanzi TC001 matrix-clock firmware with app rotation, timecode display, notifications, overlays, scrolling text, progress bars, indicators, buzzer sounds, and persistent settings.
    • Added HTTP, MQTT, OSC, JSON, and serial control interfaces.
    • Added built-in control, browsing, API reference, and fullscreen screen-monitoring pages.
    • Added an LTC-to-OSC bridge with live audio, WAV, generated timecode, and show-control support.
  • Documentation
    • Added setup instructions, architecture guidance, roadmaps, changelog templates, and contribution templates.
  • Chores
    • Added build configurations, workspace settings, release versioning, and improved generated-file handling.

dubpixel added 10 commits July 17, 2026 15:06
- AwtrixFont (BSD-3-Clause TomThumb), MQTT, OSC, text overlay
- Pixel effects: sparkle, twinkle, strobe, blink, rain
- First-boot cfg.json template (behav:1, dpx-tc002 AP, GPIO32 256 LEDs)
- Buzzer RTTTL support
- Loop rate-limited to 50Hz; UDP open deferred to connected()
- platformio_override.ini: ulanzi_tc001 USB env, shared build flags
- tools/ltc_osc_bridge: LTC→OSC bridge utility
- Remove custom /api/* routes — stripped dpx_api.h to /dpx status endpoint
- Add dpx_mqtt.h: MQTT subscribe via WLED broker (dpx/# topics)
- Add dpx_overlay.h: text overlay + pixel effects (sparkle/strobe/rain/twinkle/blink)
- Add dpx_firstboot.h: write /cfg.json on first boot (dpx-tc002 AP, behav=1, 2D 32x8)
- Replace 5x7 column-major font with AwtrixFont (BSD-3-Clause TomThumb-derived)
- Rewrite dpx_text.h renderer for GFX row-major format; fix baseline (y=0 was off-screen)
- Fix REGISTER_USERMOD missing from dpx_matrix.cpp — usermod now actually loads
- Fix UDP crash: move dpxOscBegin() to connected() (lwip not ready in setup)
- Rate-limit loop() to 50Hz — was hammering UDP socket stack on every tick
- Fix root / route shadowing WLED web UI (ESPAsyncWebServer LIFO order)
- Print IP to serial on WiFi connect; reprint when monitor opens
- Guard DEFAULT_LED_COUNT in const.h to avoid redefinition warning
- Refactor firstboot from raw JSON string to ArduinoJson builder
- readme: filled in About, Getting Started, First Boot Defaults, Usage, Acknowledgments
- platformio_override.ini: OTA env, shared common section, DPX_BTN pins
…e; serial debug; roadmap

- Any app (incl. native Time/Date/WLED) removable from rotation via dpxHiddenApps set
- WLED native app: silent passthrough so WLED effects show full screen
- handleButton() replaces _pollBtn: debounce + short/long press, uses WLED APIs
- Button layout fixed (mid/right were swapped)
- Time/Date use WLED localTime + hour()/minute() — respects useAMPM setting
- NTP enabled in firstboot config; firstboot 2D default serpentine=true
- Serial 's' command dumps IP, AP, WiFi, heap, time, app, MQTT, OSC status
- App mute: dpxMuteApp() + MQTT dpx/mute/<name> + JSON {dpx:{mute:{Name:bool}}}
- Channel mute shown in GET /dpx/apps response
- useAMPM respected: 12h with a/p suffix or 24h based on WLED setting
- ROADMAP.md: Phase 1.5 ctrl UI refactor scoped and queued
…e cleanup

- WLED_NTP_ENABLED=true in platformio_override.ini (default was false)
- NTP status added to serial 's' debug dump
- DNA Spiral (effect 182) set as default startup effect in firstboot
- Removed transition=0 from firstboot so power fade works again
- Time/Date render: snapshot localTime; leftover fragment removed
- Reverted forced ntpEnabled override (not needed with compile flag)
- Register 'dpx Matrix' as WLED effect wled#200 via strip.addEffect()
- dpxSetPixel/dpxGetPixel/dpxClear now use SEGMENT APIs (setPixelColorXY)
  → brightness, transitions, power-fade, and 2D panel mapping all work natively
- handleOverlayDraw() removed entirely
- dpxActivateEffect(): auto-switch to dpx Matrix when TC/notify/app arrives
- 'WLED' rotation slot now switches AWAY to DNA Spiral (passthrough restored)
- _dpxEffectId moved to dpx_apps.h so it's visible before first use
- firstboot default fx updated to 200 (dpx Matrix)
- WLED slot removed from native app list — dpx Matrix IS the effect,
  there is nothing underneath to passthrough to
- Effect registered with ID 255 (auto-assign) instead of 200,
  which conflicted with existing built-in effects
- Dead WLED passthrough handler removed from dpxRenderCurrentApp
- firstboot: def.fx removed (effect ID is dynamic, set via dpxActivateEffect)
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 945bcf2e-7e9b-41e2-9b17-565748322b32

📥 Commits

Reviewing files that changed from the base of the PR and between a962116 and 2814435.

⛔ Files ignored due to path filters (10)
  • images/dubpixel_identicon.png is excluded by !**/*.png
  • images/front.png is excluded by !**/*.png
  • images/front_render.png is excluded by !**/*.png
  • images/logo.png is excluded by !**/*.png
  • images/logo_HF.png is excluded by !**/*.png
  • images/pcb_front.png is excluded by !**/*.png
  • images/pcb_rear.png is excluded by !**/*.png
  • images/rear.png is excluded by !**/*.png
  • images/rear_render.png is excluded by !**/*.png
  • tools/ltc_osc_bridge/LTC_01000000_5mins_30_NDF_FPS_48000x16.wav is excluded by !**/*.wav
📒 Files selected for processing (42)
  • .gitattributes
  • .github/AGENTS.md
  • .github/ISSUE_TEMPLATE/bug-report---.md
  • .github/ISSUE_TEMPLATE/feature-request---.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .gitignore
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.md
  • Gemfile
  • VERSION
  • _config.yml
  • docs/HANDOFF_TODO.md
  • docs/ROADMAP.md
  • dpx_release_note_template.md
  • dpx_tc002_frm.code-workspace
  • platformio_override.ini
  • readme.md
  • tools/ltc_osc_bridge/Launch LTC Bridge.bat
  • tools/ltc_osc_bridge/Launch LTC Bridge.command
  • tools/ltc_osc_bridge/OSC_BRIDGE_HANDOFF.md
  • tools/ltc_osc_bridge/ltc_osc_bridge.py
  • tools/ltc_osc_bridge/ltc_osc_bridge_gui.py
  • tools/ltc_osc_bridge/pyproject.toml
  • tools/ltc_osc_bridge/requirements.txt
  • usermods/dpx_matrix/dpx_api.h
  • usermods/dpx_matrix/dpx_apps.h
  • usermods/dpx_matrix/dpx_buzzer.h
  • usermods/dpx_matrix/dpx_firstboot.h
  • usermods/dpx_matrix/dpx_font.h
  • usermods/dpx_matrix/dpx_html.h
  • usermods/dpx_matrix/dpx_matrix.cpp
  • usermods/dpx_matrix/dpx_matrix.h
  • usermods/dpx_matrix/dpx_mqtt.h
  • usermods/dpx_matrix/dpx_notifications.h
  • usermods/dpx_matrix/dpx_osc.h
  • usermods/dpx_matrix/dpx_overlay.h
  • usermods/dpx_matrix/dpx_persist.h
  • usermods/dpx_matrix/dpx_tc.h
  • usermods/dpx_matrix/dpx_text.h
  • usermods/dpx_matrix/library.json
  • wled00/const.h

Walkthrough

The change establishes the DPX Matrix firmware foundation for WLED, including rendering, apps, overlays, notifications, HTTP/MQTT/OSC control, and persistence. It also adds an LTC-to-OSC bridge with CLI and web GUI modes, plus hardware configuration, project documentation, templates, and release metadata.

Changes

DPX Matrix firmware

Layer / File(s) Summary
Firmware foundation
platformio_override.ini, wled00/const.h, usermods/dpx_matrix/*
Adds the Ulanzi TC001 build environments, DPX usermod registration, configurable LED count, first-boot setup, persistence, embedded font, and matrix drawing primitives.
Apps and display behavior
usermods/dpx_matrix/dpx_apps.h, dpx_notifications.h, dpx_tc.h, dpx_overlay.h, dpx_buzzer.h
Adds custom/native app looping, notifications, timecode rendering, scrolling, pixel effects, progress bars, and non-blocking RTTTL playback.
Runtime wiring and control interfaces
usermods/dpx_matrix/dpx_matrix.h, dpx_api.h, dpx_html.h, dpx_mqtt.h, dpx_osc.h
Connects WLED lifecycle hooks with HTTP routes, embedded control pages, MQTT commands, OSC input, JSON state handling, buttons, and runtime rendering.

LTC-to-OSC bridge

Layer / File(s) Summary
LTC decoder and CLI
tools/ltc_osc_bridge/ltc_osc_bridge.py
Adds streaming LTC decoding from audio or WAV files, timecode generation, OSC output, d3 commands, and listener registry operations.
Bridge GUI and distribution
tools/ltc_osc_bridge/ltc_osc_bridge_gui.py, pyproject.toml, requirements.txt, *.bat, *.command
Adds a Flask/SSE web interface with live, generated, and WAV modes, packaging metadata, dependencies, and platform launchers.

Project and repository documentation

Layer / File(s) Summary
Repository guidance and contribution templates
.github/*, AGENTS.md, .gitattributes, .gitignore
Adds AI workflow guidance, issue and PR templates, text normalization, and KiCad ignore patterns.
Architecture, roadmap, and project identity
ARCHITECTURE.md, docs/*, readme.md, CHANGELOG.md, dpx_release_note_template.md
Documents the firmware architecture, roadmap, control interfaces, handoff status, changelog structure, release notes, and project branding.
Workspace and site configuration
dpx_tc002_frm.code-workspace, Gemfile, _config.yml, VERSION
Adds workspace folders/settings, Jekyll configuration and dependencies, and version 0.1.0.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • wled/WLED#5403: Refactors WLED usermod registration, which may affect the new REGISTER_USERMOD(...) integration.

Suggested labels: usermod, enhancement, hardware, effect

Suggested reviewers: dedehai


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.

@dubpixel
dubpixel marked this pull request as ready for review July 18, 2026 19:09
@dubpixel dubpixel closed this Jul 18, 2026
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