[Code] Add solid reactive gradient mode (#17228)

This commit is contained in:
Albert Y 2022-07-14 19:22:53 +08:00 committed by GitHub
parent 3c58f98929
commit 300dab7962
Failed to generate hash of commit
6 changed files with 25 additions and 0 deletions

View file

@ -4,6 +4,9 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) {
# ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE
hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6);
# endif
hsv.v = scale8(255 - offset, hsv.v);
return hsv;
}