You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Get a mutable reference to a Channel from the Controller, perhaps via the indexing traits
Index on that Channel using some higher level color type and set desired color values for the LEDs
Call controller.render() when finished with this frame's changes
It'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:
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: