X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Frgb_matrix_animations%2Fsolid_color_anim.h;h=6e406380350997c9cb963c1082ea796d529a982b;hb=cf215487ba35c6754cd1c52bb900a46bb52ed3a3;hp=ba2cea15e32f549fa8bc34c738463a1336e39f03;hpb=af89752bffbaf5dcea30ea16be66b4d682701bc4;p=qmk_firmware.git diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h index ba2cea15e..6e4063803 100644 --- a/quantum/rgb_matrix_animations/solid_color_anim.h +++ b/quantum/rgb_matrix_animations/solid_color_anim.h @@ -1,16 +1,15 @@ -#pragma once +RGB_MATRIX_EFFECT(SOLID_COLOR) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_solid_color(effect_params_t* params) { +bool SOLID_COLOR(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(rgb_matrix_config.hsv); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < DRIVER_LED_TOTAL; } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS