Tidy up RGB screen property info

This commit is contained in:
Willy-JL
2024-03-07 21:34:52 +00:00
parent bf045ccf51
commit 47bd1696ba

View File

@@ -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