8000 Make status LED brightness change immediate. · cpforbes/circuitpython@503642e · GitHub
[go: up one dir, main page]

Skip to content

Commit 503642e

Browse files
committed
Make status LED brightness change immediate.
Fixes adafruit#1516
1 parent 3f42a49 commit 503642e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

supervisor/shared/rgb_led_status.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ uint32_t color_brightness(uint32_t color, uint8_t brightness) {
197197
void set_rgb_status_brightness(uint8_t level){
198198
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
199199
rgb_status_brightness = level;
200+
uint32_t curr 647D ent_color = current_status_color;
201+
// Temporarily change the current color global to force the new_status_color call to update the
202+
// LED. Usually duplicate calls of the same color are ignored without regard to brightness
203+
// changes.
204+
current_status_color = 0;
205+
new_status_color(current_color);
200206
#endif
201207
}
202208

0 commit comments

Comments
 (0)
0