1
0
Fork 0

Rename RGB and HSV structs (#24471)

This commit is contained in:
Ryan 2024-10-12 10:10:02 +11:00 committed by GitHub
parent a10e7cc858
commit 6129af93f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 122 additions and 117 deletions

View file

@ -26,11 +26,11 @@ static bool PIXEL_FRACTAL(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
if (g_rgb_timer > wait_timer) {
RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
rgb_t rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
for (uint8_t h = 0; h < MATRIX_ROWS; ++h) {
// Light and copy columns outward
for (uint8_t l = 0; l < MID_COL - 1; ++l) {
RGB index_rgb = led[h][l] ? (RGB){rgb.r, rgb.g, rgb.b} : (RGB){0, 0, 0};
rgb_t index_rgb = led[h][l] ? (rgb_t){rgb.r, rgb.g, rgb.b} : (rgb_t){0, 0, 0};
if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][l]], params->flags)) {
rgb_matrix_set_color(g_led_config.matrix_co[h][l], index_rgb.r, index_rgb.g, index_rgb.b);
}
@ -41,7 +41,7 @@ static bool PIXEL_FRACTAL(effect_params_t* params) {
}
// Light both middle columns
RGB index_rgb = led[h][MID_COL - 1] ? (RGB){rgb.r, rgb.g, rgb.b} : (RGB){0, 0, 0};
rgb_t index_rgb = led[h][MID_COL - 1] ? (rgb_t){rgb.r, rgb.g, rgb.b} : (rgb_t){0, 0, 0};
if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][MID_COL - 1]], params->flags)) {
rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], index_rgb.r, index_rgb.g, index_rgb.b);
}