Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.82k stars 3.19k forks source link

Adding support for new LED (HD108) #4169

Open mkovero opened 3 weeks ago

mkovero commented 3 weeks ago

What happened?

Hi, as I did simple support for HD108 led in NeoPixelBus (https://github.com/Makuna/NeoPixelBus/pull/838) I thought doing so on WLED as well to help out my personal projects a bit. Naively I thought that simply a) cloning B_HS_DOT_3 / B_SS_DOT_3 magic as an example in bus_wrapper.h with new HD108 methods and b) incrementing I_HS_DOT_3 / I_SS_DOT_3 id's by one after last known definition, #define I_HS_HD108_3 63 #define I_SS_HD108_3 64 c) adding new type in const.h #define TYPE_HD108 55 d) adding new option in settings_leds.htm (and rebuilding the html headers afterwards) <option value="55">HD108</option>\

would do the trick but unfortunately I only get crash & reboot after selecting HD108 from the settings page. However, if I just replace the methods used by APA102 in bus_wrapper.h I'm able to use LEDs fine. So I'm not that far am I? Something fancy happening with id's I should be aware of?) Currently I do not have board I could debug but will get there if nothing else helps)

Thanks for your time)

To Reproduce Bug

Try adding support for new LED strip.

Expected Behavior

To be able to do so.

Install Method

Self-Compiled

What version of WLED?

latest master

Which microcontroller/board are you seeing the problem on?

ESP32, ESP32-S2

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

netmindz commented 3 weeks ago

Hi @mkovero

Thanks for your interest in adding support for extra LED types. We have recently done some work to make this a bit easier, so please create your branch from the 0_15 branch. You will no longer need to edit the html at all.

I'm not sure about the other changes required as I'm not familiar with this LED type and what is required to use it with NPB