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

@ -1,6 +1,6 @@
#pragma once
typedef HSV (*i_f)(HSV hsv, uint8_t i, uint8_t time);
typedef hsv_t (*i_f)(hsv_t hsv, uint8_t i, uint8_t time);
bool effect_runner_i(effect_params_t* params, i_f effect_func) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
@ -8,7 +8,7 @@ bool effect_runner_i(effect_params_t* params, i_f effect_func) {
uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 4, 1));
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
rgb_t rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return rgb_matrix_check_finished_leds(led_max);