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

Clearing rest of buffer in ws2812_push #70

Open
king2 opened this issue Jul 22, 2018 · 4 comments
Open

Clearing rest of buffer in ws2812_push #70

king2 opened this issue Jul 22, 2018 · 4 comments

Comments

@king2
Copy link

king2 commented Jul 22, 2018

I see is that WS2812_THREE_SAMPLE will clear rest of buffer (fill it with zeroes), while WS2812_FOUR_SAMPLE leaves rest of buffer intact.

Is this a mistake or I cannot understand something important about how it works?

@cnlohr
Copy link
Owner

cnlohr commented Jul 22, 2018

I don't really remember the rationale either way, it's unlike to cause serious adverse effects. I know that the 3-sample one can potentially have overlapping leds over the same word, so on that it's probably useful to clear out the next few, but on the four, it probably doesn't matter at all.

@king2
Copy link
Author

king2 commented Jul 22, 2018

It does matter just when you want to call ws_2812 with small buffer, not covering all LEDs you have. In this case with "3 sample" rest of LEDs will be set to zero, in case of '4 sample" rest of LEDs will be kept at previous state.

It is really not important, I just wanted to help to make code more clear and consistent :)

@cnlohr
Copy link
Owner

cnlohr commented Jul 22, 2018

If you make a PR and test it, I'd merge, but otherwise, probably not worth the change.

@king2
Copy link
Author

king2 commented Jul 23, 2018

OK, I'll try to do it when I will return from Sysadmin's day celebration :)

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

No branches or pull requests

2 participants