espressif / idf-extra-components

Additional components for ESP-IDF, maintained by Espressif
136 stars 85 forks source link

[led_strip] Add support for bytes order other than GRB (IEC-123) #341

Open pidpawel opened 1 month ago

pidpawel commented 1 month ago

Is your feature request related to a problem?

Yes. My devboard has a WS2812 variant that seems to be using RGB format, instead of GRB one so all led_indicator animations are wrong.

Describe the solution you'd like.

It'd be ideal to add other pixel formats in led_pixel_format_t. ESPHome seems to be supporting any arbitrary format so probably support like this makes the most sense. https://github.com/esphome/esphome/blob/dev/esphome/components/esp32_rmt_led_strip/led_strip.cpp#L129

Describe alternatives you've considered.

In the meantime I'll probably add macrodefinitions for arbitrary colours in the code, with a comment why the order's changed.

Additional context.

No response