summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorC47D <carlos.santiago.diaz@gmail.com>2019-07-08 22:06:43 -0500
committerC47D <carlos.santiago.diaz@gmail.com>2019-07-08 22:06:43 -0500
commit40fbac13cdf3743d2a9f218fa067399a88ad164a (patch)
tree0a400bdfc0adf83eed33f156af350eca481fc45f /supervisor
parent324cbe432753297f8de6c512e2186b5075c050d0 (diff)
[rgb status] Adjust to current brightness
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/rgb_led_status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/supervisor/shared/rgb_led_status.c b/supervisor/shared/rgb_led_status.c
index 7ca92c677..0e69cd2e0 100644
--- a/supervisor/shared/rgb_led_status.c
+++ b/supervisor/shared/rgb_led_status.c
@@ -293,7 +293,7 @@ void clear_temp_status() {
}
uint32_t color_brightness(uint32_t color, uint8_t brightness) {
- #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
+ #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) || (defined(CP_RGB_STATUS_LED))
uint32_t result = ((color & 0xff0000) * brightness / 255) & 0xff0000;
result += ((color & 0xff00) * brightness / 255) & 0xff00;
result += ((color & 0xff) * brightness / 255) & 0xff;
@@ -304,7 +304,7 @@ uint32_t color_brightness(uint32_t color, uint8_t brightness) {
}
void set_rgb_status_brightness(uint8_t level){
- #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
+ #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) || (defined(CP_RGB_STATUS_LED))
rgb_status_brightness = level;
uint32_t current_color = current_status_color;
// Temporarily change the current color global to force the new_status_color call to update the