summaryrefslogtreecommitdiff
path: root/keyboards/bandominedoni/rgb_matrix_kb.inc
diff options
context:
space:
mode:
author3araht <69518343+3araht@users.noreply.github.com>2021-12-27 19:27:15 +0900
committerGitHub <noreply@github.com>2021-12-27 21:27:15 +1100
commit4e077250d56f7e786af0cdef00f4b41d77e2b85c (patch)
treeac9e7c62f60d0ede6cddc733a3627b3d01308a03 /keyboards/bandominedoni/rgb_matrix_kb.inc
parent07465c0ebbabf35079fed70a58e73da1e9419444 (diff)
downloadqmk_firmware-4e077250d56f7e786af0cdef00f4b41d77e2b85c.tar.gz
qmk_firmware-4e077250d56f7e786af0cdef00f4b41d77e2b85c.zip
bandominedoni, Drashna's method is applied to encoder_update_kb. (#15287)
* Drashna's method is applied to rotary encoder rotation detection. rgb_matrix_user.inc -> rgb_matrix_kb.inc. * Disabled some RGB MATRIX effects to shrink the firmware size. * via # of layers changed from 5 to 4.
Diffstat (limited to 'keyboards/bandominedoni/rgb_matrix_kb.inc')
-rw-r--r--keyboards/bandominedoni/rgb_matrix_kb.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/keyboards/bandominedoni/rgb_matrix_kb.inc b/keyboards/bandominedoni/rgb_matrix_kb.inc
new file mode 100644
index 0000000000..77ad22c1ce
--- /dev/null
+++ b/keyboards/bandominedoni/rgb_matrix_kb.inc
@@ -0,0 +1,16 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+RGB_MATRIX_EFFECT(my_party_rocks)
+
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+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);
+ // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b);
+ return rgb_matrix_check_finished_leds(led_max);
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED