Skip to content

fix-solid-color-sync#5706

Open
Garold86 wants to merge 1 commit into
wled:mainfrom
Garold86:Garold86-patch-1
Open

fix-solid-color-sync#5706
Garold86 wants to merge 1 commit into
wled:mainfrom
Garold86:Garold86-patch-1

Conversation

@Garold86

@Garold86 Garold86 commented Jun 26, 2026

Copy link
Copy Markdown

What
In the UDP notifier receive path (parseNotifyPacket, wled00/udp.cpp), incoming colors were applied only to the main segment, while effect/speed/intensity/palette were applied to all selected segments. So color changes never reached non-main selected segments on receiving instances. Most visible with the Solid effect, where colors[0] is the entire output.

Why / how
Adds color application to the existing per-selected-segment sync loop, mirroring how palette is already handled and reusing the same version-gating as the main-segment color block.

Notes
The original main-segment color block is kept (covers an unselected main segment + CCT). Segment::setColor() early-returns when the value is unchanged, so no double transition.
Only runs when "Segment options" sync is off; the receiveSegmentOptions path already handles per-segment color.
No platformio.ini changes. Built and tested on hardware (ESP32-Ethernet) — Solid color now syncs across all selected segments on all instances.

Fixes #5705

Summary by CodeRabbit

  • Bug Fixes
    • Improved sync behavior so incoming color updates are applied more reliably.
    • Ensured selected active segments receive the updated RGBW and related color values, including version-dependent white/CCT handling.
    • Expanded the simple effect sync path so it also responds to color changes when no selection filtering is active.

Fix: sync color to all selected segments, not just main (Solid effect)
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f79e4fdf-48a4-4f3a-bbff-67189c0780ee

📥 Commits

Reviewing files that changed from the base of the PR and between 19e268c and fa292f4.

📒 Files selected for processing (1)
  • wled00/udp.cpp

Walkthrough

The UDP notification receive path now treats color updates like effect and palette updates in the simple sync branch, and applies incoming color bytes to all selected active segments.

Changes

UDP sync color application

Layer / File(s) Summary
Simple sync branch and color propagation
wled00/udp.cpp
The UDP receive path now enters the simple effect sync block for color notifications and applies incoming primary, secondary, and tertiary colors to selected active segments in that path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

bug

Suggested reviewers

  • softhack007
  • DedeHai
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 is concise and directly describes the main change: fixing solid color sync across segments.
Linked Issues check ✅ Passed The change addresses #5705 by applying incoming color updates to all selected segments when Segment options sync is off.
Out of Scope Changes check ✅ Passed The only code changes match the sync color fix described in the issue summary, with no unrelated changes noted.

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.

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.

v16.0 - sync across multiple controllers / segments losing colour

1 participant