Skip to content

Fix calling usermod overlay prior to setup - 16.x - #5935

Open
willmmiles wants to merge 3 commits into
wled:16_xfrom
willmmiles:overlay-too-early-16_x
Open

willmmiles wants to merge 3 commits into
wled:16_xfrom
willmmiles:overlay-too-early-16_x

Conversation

@willmmiles

@willmmiles willmmiles commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Backport of #5933.

Summary by CodeRabbit

  • Updates
    • Overlay graphics are drawn as part of LED output updates, keeping them visible in the rendered output.
    • When no relay pin is configured, LED buses are set to black and updated directly.
    • LED output no longer supports show-callback configuration, and callback-based output handling is no longer available. Output behavior now follows the built-in update flow.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: wled/WLED
  • Branch: 16_x
  • File: .coderabbit.yaml
  • Commit: 134b43d
  • Layers: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 550d97c8-ea3b-4b78-a56c-36f7cac48995
Commits

Reviewing files that changed from the base of the PR and between 134b43d and d4a9868.

Files selected for processing: 5
  • wled00/FX.h
  • wled00/FX_fcn.cpp
  • wled00/bus_manager.cpp
  • wled00/bus_manager.h
  • wled00/wled.cpp
Files with no reviewable changes: 1
  • wled00/FX.h

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Recent review details
Additional context used
Code guidelines: 3
docs/securecode.instructions.md — configured
docs/cpp.instructions.md — configured
AGENTS.md — configured
Path-based instructions: 5
Apply the WLED security hardening rules from docs/hardening.instructions.md, and consult docs/securecode.instructions.md when more details are needed for actionable recommendations.

CodeRabbit configuration file

Files:

  • wled00/bus_manager.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_manager.h
  • wled00/wled.cpp
Follow the C++ coding conventions documented in docs/cpp.instructions.md and the general project guidelines in AGENTS.md and .github/copilot-instructions.md.

CodeRabbit configuration file

Files:

  • wled00/bus_manager.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_manager.h
  • wled00/wled.cpp
Applicability reference: AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference See also: `.github/copilot-instructions.md`, `.github/agent-build.instructions.md`, `docs/cpp.instructions.md`, `docs/web.instructions.md`, `d...

CodeRabbit inference engine (docs/securecode.instructions.md)

Files:

  • wled00/bus_manager.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_manager.h
  • wled00/wled.cpp
Applicability reference: AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference See also: `.github/copilot-instructions.md`, `.github/agent-build.instructions.md`, `docs/cpp.instructions.md`, `docs/web.in...

CodeRabbit inference engine (docs/cpp.instructions.md)

Files:

  • wled00/bus_manager.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_manager.h
  • wled00/wled.cpp
Source excerpt: Follow the existing style in the file you are editing Source excerpt: Avoid unexplained "magic numbers".

CodeRabbit inference engine (AGENTS.md)

Files:

  • wled00/bus_manager.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_manager.h
  • wled00/wled.cpp
Additional comments: 4
wled00/FX_fcn.cpp: 1

1737-1738: LGTM!

wled00/bus_manager.h: 1

566-566: LGTM!

wled00/bus_manager.cpp: 1

1431-1438: LGTM!

wled00/wled.cpp: 1

612-616: LGTM!

Walkthrough

The strip show path now draws overlays through handleOverlayDraw() instead of a registered callback. BusManager adds a method to clear every bus. When no relay pin is configured, beginStrip clears and shows the buses through BusManager.

Changes

Overlay rendering and bus initialization

Layer / File(s) Summary
Direct overlay rendering
wled00/FX.h, wled00/FX_fcn.cpp
WS2812FX removes the show callback API. Its show() method calls handleOverlayDraw() to draw overlays.
Bus clearing and initialization
wled00/bus_manager.h, wled00/bus_manager.cpp, wled00/wled.cpp
BusManager::blank() sets each pixel on every bus to black. When no relay pin is configured, beginStrip calls blank() and then BusManager::show().

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • wled/WLED#5933: Removes the show callback, draws overlays from WS2812FX::show(), and blanks buses during beginStrip(). This PR is its 16.x backport.

Suggested labels: bug, usermod

Suggested reviewers: dedehai

Merge Risk: Minimal · up to d4a98

The change is mergeable with no concrete current-head risk identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: preventing the usermod overlay from being called before setup on the 16.x branch.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 4 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

coderabbitai[bot]

This comment was marked as resolved.

This function is unused - no need to pay for the indirection.
If not using a relay, explicitly black out the LED data instead of
calling the rendering engine at boot.  This avoids calling
usermod overlays prior to usermod setup.
@willmmiles
willmmiles force-pushed the overlay-too-early-16_x branch from c29a9ac to f3b454f Compare October 25, 2026 14:36
@willmmiles

Copy link
Copy Markdown
Member Author

Apologies for force-push, looks like the rebase dropped half the first commit. :(

@softhack007

This comment was marked as outdated.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants