From 0b46681d3eb98c01f9308eac3d7a9cffb9994414 Mon Sep 17 00:00:00 2001 From: HaxSam Date: Tue, 5 Mar 2024 23:52:43 +0100 Subject: [PATCH 1/3] didnt got all the code --- lib/drivers/rgb_backlight.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/drivers/rgb_backlight.c b/lib/drivers/rgb_backlight.c index 959c759228..b9046483f5 100644 --- a/lib/drivers/rgb_backlight.c +++ b/lib/drivers/rgb_backlight.c @@ -313,10 +313,7 @@ void rgb_backlight_update(uint8_t brightness, bool forced) { return; } - bool brightness_changed = brightness != rgb_state.last_brightness; - rgb_state.last_brightness = brightness; - if(rgb_settings.rainbow_mode != RGBBacklightRainbowModeOff || brightness_changed) - SK6805_update(); + SK6805_update(); furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); } From 215769247c16e7a4d525d3383b67786f2aef09a8 Mon Sep 17 00:00:00 2001 From: HaxSam Date: Wed, 6 Mar 2024 00:18:47 +0100 Subject: [PATCH 2/3] missed the line --- lib/drivers/rgb_backlight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/drivers/rgb_backlight.c b/lib/drivers/rgb_backlight.c index b9046483f5..4e7f54019a 100644 --- a/lib/drivers/rgb_backlight.c +++ b/lib/drivers/rgb_backlight.c @@ -313,6 +313,7 @@ void rgb_backlight_update(uint8_t brightness, bool forced) { return; } + rgb_state.last_brightness = brightness; SK6805_update(); furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); From 50201d8ac77581c0d2e6361dccf66e3aa7bec419 Mon Sep 17 00:00:00 2001 From: HaxSam Date: Wed, 6 Mar 2024 00:24:21 +0100 Subject: [PATCH 3/3] Next time i check a .patch --- lib/drivers/rgb_backlight.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/drivers/rgb_backlight.c b/lib/drivers/rgb_backlight.c index 4e7f54019a..0da1761fbe 100644 --- a/lib/drivers/rgb_backlight.c +++ b/lib/drivers/rgb_backlight.c @@ -243,9 +243,6 @@ void rainbow_timer(void* ctx) { SK6805_update(); - if(rgb_state.enabled && rgb_settings.rainbow_mode == RGBBacklightRainbowModeOff) - SK6805_update(); - furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); UNUSED(ctx); }