Rename RGB/HSV structs: keyboard-level code (#24476)
This commit is contained in:
parent
5478051d74
commit
9884e4982b
43 changed files with 215 additions and 215 deletions
|
@ -5,7 +5,7 @@ RGB_MATRIX_EFFECT(my_party_rocks)
|
|||
|
||||
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
|
||||
static HSV my_solid_reactive_multiwide_col_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
|
||||
static hsv_t my_solid_reactive_multiwide_col_math(hsv_t hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
|
||||
uint16_t effect = tick + dist;
|
||||
dx = dx < 0 ? dx * -1 : dx;
|
||||
dx = dx * 16 > 255 ? 255 : dx * 16;
|
||||
|
@ -27,7 +27,7 @@ bool my_solid_reactive_col(effect_params_t* params) {
|
|||
uint16_t max_tick = 65535 / rgb_matrix_config.speed;
|
||||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
RGB_MATRIX_TEST_LED_FLAGS();
|
||||
HSV hsv = rgb_matrix_config.hsv;
|
||||
hsv_t hsv = rgb_matrix_config.hsv;
|
||||
uint16_t tick = max_tick;
|
||||
// Reverse search to find most recent key hit
|
||||
for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
|
||||
|
@ -39,7 +39,7 @@ bool my_solid_reactive_col(effect_params_t* params) {
|
|||
|
||||
uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
|
||||
hsv.h += qsub8(130, offset);
|
||||
RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
|
||||
rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
|
||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||
}
|
||||
return led_max < RGB_MATRIX_LED_COUNT;
|
||||
|
@ -47,8 +47,8 @@ bool my_solid_reactive_col(effect_params_t* params) {
|
|||
|
||||
bool my_party_rocks(effect_params_t* params) {
|
||||
RGB_MATRIX_USE_LIMITS(led_min, led_max);
|
||||
HSV hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v};
|
||||
RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
|
||||
hsv_t hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v};
|
||||
rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
|
||||
// rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||
rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b);
|
||||
return led_max < RGB_MATRIX_LED_COUNT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue