forked from mirrors/qmk_userspace
[Code] Add solid reactive gradient mode (#17228)
This commit is contained in:
parent
3c58f98929
commit
300dab7962
6 changed files with 25 additions and 0 deletions
|
@ -14,6 +14,9 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
|
|||
static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
|
||||
uint16_t effect = tick + dist * 5;
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue