Rename RGB and HSV structs (#24471)
This commit is contained in:
parent
a10e7cc858
commit
6129af93f4
59 changed files with 122 additions and 117 deletions
|
@ -7,7 +7,7 @@ RGB_MATRIX_EFFECT(PIXEL_FLOW)
|
|||
|
||||
static bool PIXEL_FLOW(effect_params_t* params) {
|
||||
// LED state array
|
||||
static RGB led[RGB_MATRIX_LED_COUNT];
|
||||
static rgb_t led[RGB_MATRIX_LED_COUNT];
|
||||
|
||||
static uint32_t wait_timer = 0;
|
||||
if (wait_timer > g_rgb_timer) {
|
||||
|
@ -22,7 +22,7 @@ static bool PIXEL_FLOW(effect_params_t* params) {
|
|||
// Clear LEDs and fill the state array
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
for (uint8_t j = 0; j < RGB_MATRIX_LED_COUNT; ++j) {
|
||||
led[j] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
|
||||
led[j] = (random8() & 2) ? (rgb_t){0, 0, 0} : hsv_to_rgb((hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ static bool PIXEL_FLOW(effect_params_t* params) {
|
|||
led[j] = led[j + 1];
|
||||
}
|
||||
// Fill last LED
|
||||
led[led_max - 1] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
|
||||
led[led_max - 1] = (random8() & 2) ? (rgb_t){0, 0, 0} : hsv_to_rgb((hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v});
|
||||
// Set pulse timer
|
||||
wait_timer = g_rgb_timer + interval();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue