Thanks for the report!
I’m thinking about a solution to add LV_LED_BRIGHT_OFF a LV_LED_BRIGHT_ON to lv_conf.h and limit the value in lv_led_set_bright.
What do you think?
First I want to thank you for creating LittleVGL! It satisfies a real need in embedded computing. These small graphics touch-displays are very affordable, and this makes it relatively easy to create inexpensive, user-friendly devices using Cortex-M class CPUs. I teach a course in Embedded Systems and I’m thinking of introducing LVGL next semester, and I’m giving a talk at TCF (tcf-nj DOT org) that will introduce LVGL.
If I understand your proposal correctly it would guarantee that the current problem can’t occur, as it would clip whatever value set for an LED to the _ON and _OFF levels. That sounds reasonable to me.