Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DDP sources that don't PUSH #3834

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

willmmiles
Copy link
Collaborator

WLED was depending on the DDP PUSH flag to indicate when to push the updated LED colors to the hardware. However, use of this flag is technically optional in the DDP protocol. This patch adds support non-pushing sources by applying updates immediately until a PUSH is received (thereby indicating that the source does, in fact, want some kind of synchronization).

This was discovered somewhat accidentally by @bigredfrog (holidayhero on Discord) as a bug in LEDFX was preventing them from sending the PUSH flag in some cases. This resulted in the counterintuitive behavior of "peek" showing the updated colors, but the actual physical LEDs remaining frozen.

If the source never sends the push flag, WLED buffers the update but
never publishes it to the LEDs.  This causes the confusing case where
the peek display shows one thing but the LEDs themselves something else.

Add a static flag that tracks if we've seen a push from the source;
until we do, apply every update as soon as it's received, per the DDP
specification.
@willmmiles willmmiles changed the base branch from main to 0_15 March 19, 2024 01:09
@blazoncek blazoncek merged commit 6d03c3a into Aircoookie:0_15 Mar 19, 2024
3 of 17 checks passed
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.

2 participants