srwi / FastLEDHub

Control multiple FastLED lightstrip animations on the ESP8266 and ESP32 without reuploading.
GNU Lesser General Public License v2.1
56 stars 3 forks source link

add setColor #25

Open thijstriemstra opened 6 months ago

srwi commented 6 months ago

Hi @thijstriemstra, could you please motivate this change a bit? I think the new color picker value should be broadcasted to active websocket connections so that the web ui is in sync with the actual color value.

thijstriemstra commented 6 months ago

I have a project with 16 predefined colors and a button that allows you to cycle through them. I use setColor to change the color when the button is pressed and a broadcastMessagethat sends a currentColor and on the client the color is changed. Without this change I would have to add 16 color pickers (all named Color? not sure if it's even possible), making the UI very confusing for the end user. Now one color picker controls the LED overall color (and using the button sets the colorpicker as well).

I can keep the code submitted in this PR in a separate CustomColorclass or something but just thought this might be a simple enhancement. Feel free to close it.

srwi commented 6 months ago

If I understand correctly you added some more code to your project to broadcast the changed color to active clients. I really like that and would appreciate if you could add that functionality to this PR so that the new feature is more complete.

thijstriemstra commented 3 months ago

I really like that and would appreciate if you could add that functionality

I do have that code somewhere, no problem. I'll mark this as draft till I find it.