-
Notifications
You must be signed in to change notification settings - Fork 25
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
New API Design #1
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So the API is pretty garbage right now. Lets figure out how to fix it.
Vision
Currently I envision a (mostly) two struct system, a Controller and a Channel, a lot like the @meh implementation from a while back, however, there are some improvements to be made there.
General usage flow
Channel
from theController
, perhaps via the indexing traitsChannel
using some higher level color type and set desired color values for the LEDscontroller.render()
when finished with this frame's changesIt's not all that different from the C API, but hopefully we can integrate some of those zero cost abstractions that everyone loves, especially around the color typing and the error handling. Realistically, we're going to have to get creative if we want to store richer color types co-locally with the actual 0-255 byte representation in the driver. I'm not even sure its worth messing with in this low level of a library.
Anyway, feedback is greatly appreciated!
The text was updated successfully, but these errors were encountered: