From 300dab7962ba50dcb4c550c91097573fa09b8dea Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Thu, 14 Jul 2022 19:22:53 +0800 Subject: [Code] Add solid reactive gradient mode (#17228) --- quantum/rgb_matrix/animations/solid_reactive_cross.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quantum/rgb_matrix/animations/solid_reactive_cross.h') diff --git a/quantum/rgb_matrix/animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h index 043a369b73..9e5703a0ea 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix/animations/solid_reactive_cross.h @@ -19,6 +19,9 @@ static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t di dy = dy * 16 > 255 ? 255 : dy * 16; effect += dx > dy ? dy : dx; if (effect > 255) effect = 255; +# ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE + hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6); +# endif hsv.v = qadd8(hsv.v, 255 - effect); return hsv; } -- cgit v1.2.3