8000 [rgb status] Adjust to current brightness · domdfcoding/circuitpython@40fbac1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 40fbac1

Browse files
committed
[rgb status] Adjust to current brightness
1 parent 324cbe4 commit 40fbac1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

supervisor/shared/rgb_led_status.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void clear_temp_status() {
293293
}
294294

295295
uint32_t color_brightness(uint32_t color, uint8_t brightness) {
296-
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
296+
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) || (defined(CP_RGB_STATUS_LED))
297297
uint32_t result = ((color & 0xff0000) * brightness / 255) & 0xff0000;
298298
result += ((color & 0xff00) * brightness / 255) & 0xff00;
299299
result += ((color & 0xff) * brightness / 255) & 0xff;
@@ -304,7 +304,7 @@ uint32_t color_brightness(uint32_t color, uint8_t brightness) {
304304
}
305305

306306
void set_rgb_status_brightness(uint8_t level){
307-
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
307+
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) || (defined(CP_RGB_STATUS_LED))
308308
rgb_status_brightness = level;
309309
uint32_t current_color = current_status_color;
310310
// Temporarily change the current color global to force the new_status_color call to update the

0 commit comments

Comments
 (0)
0