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

Methods with double buffers can incorrectly apply "chip" settings. #842

Closed
Makuna opened this issue Sep 20, 2024 · 2 comments
Closed

Methods with double buffers can incorrectly apply "chip" settings. #842

Makuna opened this issue Sep 20, 2024 · 2 comments
Assignees
Labels

Comments

@Makuna
Copy link
Owner

Makuna commented Sep 20, 2024

Describe the bug
Some chips have settings that are included in the color data stream. These are set by using the NeoPixelBus::SetPixelSettings().
Some methods use a double buffer, such that after each call to Show(), the buffers are swapped.
If a sketch has a case that uses both of these, and then calls Show(false) to optimize the send to not copy data from one buffer to the other (usually due to the sketch expecting to draw the complete buffer each frame), then the settings are only present in one of the buffers and output will alternate with correct and then incorrect settings.

To Reproduce
Use an ESP32 with RMT method.
Use a LED that contains settings defined by the Feature.
Use a sketch that call Show(false).

Expected behavior
Both buffers should be updated with the settings.

Additional context
Current method architecture has the settings applied by the Feature, which has no insight to the double buffering in the Method. So a work around is that even though Show() is called with false, it should still copy the settings between buffers. But are the settings always at the front of the data stream.
NEXT BIG RELEASE the Methods architecture has already been reworked in a branch that makes this issue non-existent sa the Method stores the settings and applies it rather than the Feature applying it. But this is still months away at best.

@Makuna Makuna added bug investigating Currently under investigation for more understanding of the problem. labels Sep 20, 2024
@Makuna Makuna self-assigned this Sep 20, 2024
@Makuna Makuna added pending Pending new release; already merged but not released in a version and removed investigating Currently under investigation for more understanding of the problem. labels Sep 23, 2024
@Makuna
Copy link
Owner Author

Makuna commented Sep 23, 2024

#845

@Makuna Makuna removed the pending Pending new release; already merged but not released in a version label Sep 27, 2024
@Makuna
Copy link
Owner Author

Makuna commented Sep 27, 2024

@Makuna Makuna closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant