From 47bd1696ba58b91cc0cf0766ace8759ec764593b Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:34:52 +0000 Subject: [PATCH] Tidy up RGB screen property info --- targets/f7/furi_hal/furi_hal_info.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/targets/f7/furi_hal/furi_hal_info.c b/targets/f7/furi_hal/furi_hal_info.c index 7c33c5840..3780c96e1 100644 --- a/targets/f7/furi_hal/furi_hal_info.c +++ b/targets/f7/furi_hal/furi_hal_info.c @@ -72,18 +72,25 @@ void furi_hal_info_get(PropertyValueCallback out, char sep, void* context) { &property_context, "%d", 2, "hardware", "color", furi_hal_version_get_hw_color()); // RGB Settings - property_value_out(&property_context, "%d", 3, "hardware", "rgb", "enabled", momentum_settings.rgb_backlight); - - for(int i = 0; i < SK6805_get_led_count(); i++){ + property_value_out( + &property_context, + "%d", + 4, + "hardware", + "screen", + "rgb", + "enabled", + momentum_settings.rgb_backlight); + for(int i = 0; i < SK6805_get_led_count(); i++) { RgbColor rgb; rgb_backlight_get_color(i, &rgb); uint32_t led_value = 0; - memcpy(((void *)&led_value) + 1, &rgb, sizeof(RgbColor)); + memcpy(((void*)&led_value) + 1, &rgb, sizeof(RgbColor)); - char id_string[2] = {'0'+i, '\0'}; - - property_value_out(&property_context, "%06X", 4, "hardware", "rgb", "led", id_string, __REV(led_value)); + char led_string[5] = {'l', 'e', 'd', '0' + i, '\0'}; + property_value_out( + &property_context, "%06X", 4, "hardware", "screen", "rgb", led_string, __REV(led_value)); } // VGM Settings