-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
ws2812 mix: add all, then divide #2032
Conversation
@Alkorin does this look reasonable to you? |
What's the size of an 'int' ? |
@nwf do you plan to address Thomas' feedback? |
Mm, sorry, I am busy writing my PhD thesis, so time is basically, uh, zero. That said, I don't object, but I'm not sure a uint32_t is really necessary; a uint16_t would handle mixing hundreds of framebuffers without overflow, no? |
As That's why I think |
@Alkorin Erm, yes, of course. OK. I'll make the change when I get a minute. |
This achieves rounding between multiple summed frame buffers
38835b0
to
3a926e8
Compare
Let's that on for size (thesis document done, too!) |
@Alkorin @marcelstoer ping |
This achieves rounding between multiple summed frame buffers
dev
branch rather than formaster
.This flips the ws2812 framebuffer
mix
function to add all the contributions together before dividing; this allows one to, as I do, ensure that a channel stays on even in light of other operations:basefb:fill(1,1,1) ; outfb:mix(255,basefb,256/dimfactor,infb)
, which results in dimming that doesn't zero out color channels.No docs changes necessary, I think.