-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add support for dynamic ColorFeature selection rather than static compiled into the type like today #804
Comments
@blazoncek Per discussion, I am capturing your request into this issue, and I will capture investigations here. I hope you can follow along and provide feedback as you consider how this could be integrated into WLED. Current investigation shows the following are currently supported and if exposed as an enum would be similar to...
|
Sure will! Thank you for support. #define B_8266_U0_NEO_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp8266Uart0Ws2813Method, NeoGammaNullMethod>
#define B_8266_U0_NEO_4 NeoPixelBusLg<NeoGrbwFeature, NeoEsp8266Uart0Ws2813Method, NeoGammaNullMethod>
#define B_8266_U0_TM1_4 NeoPixelBusLg<NeoWrgbTm1814Feature, NeoEsp8266Uart0Tm1814Method, NeoGammaNullMethod>
#define B_8266_U0_TM2_3 NeoPixelBusLg<NeoBrgFeature, NeoEsp8266Uart0Tm1829Method, NeoGammaNullMethod>
#define B_8266_U0_UCS_3 NeoPixelBusLg<NeoRgbUcs8903Feature, NeoEsp8266Uart0Ws2813Method, NeoGammaNullMethod>
#define B_8266_U0_UCS_4 NeoPixelBusLg<NeoRgbwUcs8904Feature, NeoEsp8266Uart0Ws2813Method, NeoGammaNullMethod>
#define B_8266_U0_APA106_3 NeoPixelBusLg<NeoRbgFeature, NeoEsp8266Uart0Apa106Method, NeoGammaNullMethod>
#define B_8266_U0_FW6_5 NeoPixelBusLg<NeoGrbcwxFeature, NeoEsp8266Uart0Ws2813Method, NeoGammaNullMethod>
#define B_8266_U0_2805_5 NeoPixelBusLg<NeoGrbwwFeature, NeoEsp8266Uart0Ws2805Method, NeoGammaNullMethod>
#define B_8266_U0_TM1914_3 NeoPixelBusLg<NeoRgbTm1914Feature, NeoEsp8266Uart0Tm1914Method, NeoGammaNullMethod>
#define B_HS_DOT_3 NeoPixelBusLg<DotStarBgrFeature, DotStarSpiHzMethod, NeoGammaNullMethod>
#define B_HS_LPD_3 NeoPixelBusLg<Lpd8806GrbFeature, Lpd8806SpiHzMethod, NeoGammaNullMethod>
#define B_HS_LPO_3 NeoPixelBusLg<Lpd6803GrbFeature, Lpd6803SpiHzMethod, NeoGammaNullMethod>
#define B_HS_WS1_3 NeoPixelBusLg<NeoRbgFeature, Ws2801SpiHzMethod, NeoGammaNullMethod>
#define B_HS_P98_3 NeoPixelBusLg<P9813BgrFeature, P9813SpiHzMethod, NeoGammaNullMethod> Edited to only have distinct of features included. Some are named features but could be replaced by generic features if needed. We are using |
This coming refactor for this request will include dynamic color order with it, along with dynamic number of elements. The constructor for NeoPixelBus will look similar to the following (details still being worked out, but in that test branch it already has BusView implemented. These changes are to facilitate a single class that is dynamically set when constructed rather than at compile time.
BusView is a class that will abstract the layout, today it is just count and the loop of smaller collection across a large strip (memory saving). Longer term it's the abstraction for matrix and possible multiple strip merging (lower priority for a while).
A collection of ColorFeatureConfig will be provided that maps to specific chips. These can be passed as that argument and would be defined like...
So, if there is a config you need, you can provide your own.
All examples above are a still a work in progress and some bits omitted (methods) to keep it simple to read. |
Thinking of it, we (in general, not just WLED) need: a) number of channels (i.e. W, WC, RGB, RGBWC, etc) Looking at your feature set you’ve split those across multiple differently named features. If you want to simplify and only have one copied from Discord for posterity Forgive me, but my brain sometimes need to reiterate to absorb what was said. |
I design little LED controllers with OLED screens built-in, they're controlled via Wi-Fi network, it's wonderful if I was able to change the strip type and pixel count directly on the screen of the device, since DIY projects offen comes with a random idea and some LED strips lying around with random length/ chip type. please do update the dynamic change of T_FEATURE and T_METHOD if possiable , dynamic pixel count is already available and works like a charm,please do update the feature and method. sorry for my poor english, not a native speaker, and have a nice day! |
Is your feature request related to a problem? Please describe.
Today, consumers that expose user selectable LED types require scaffolding to instance different classes of NeoPixelBus due to the ColorFeature selection being a template argument.
Describe the solution you'd like
A dynamic ColorFeature that is given an argument that defines the selection so that one NeoPixelBus type can be used with any LED types.
Additional context
Note this is not covering the similiar issue with the Method template argument, this is just for the Feature template argument.
The text was updated successfully, but these errors were encountered: