Skip to content

Colored status led not fully working #2630

@tazounet

Description

@tazounet

Hello,

I was using the code from "pio/ws2812" without problems and then I switch to the new "colored status led" library with the sdk 2.2.0.

  1. "colored_status_led_set_on_with_color" don't change the color if the LED is already ON. Why not but it's not describe in the documentation.
  2. I created a "colored_status_led_change_color" function to handle color change, but it was not working until I add a sleep between "colored_status_led_set_state" and "colored_status_led_set_on_with_color". This timing constraint is not in the documentation. Is it a bug ?
  3. Adding a "colored_status_led_change_color" directly in the library could be a good addition :)

The working code:

bool colored_status_led_change_color(uint32_t color)
{
    colored_status_led_set_state(false);
    sleep_us(100);
    return colored_status_led_set_on_with_color(color);
}

Thanks

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions