aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc
diff options
context:
space:
mode:
authorGravatar Niclas <niclas@countingsort.com>2020-06-19 01:32:27 +0000
committerGravatar GitHub <noreply@github.com>2020-06-18 18:32:27 -0700
commit3eefe31a54df07f5624f49632d986dff9725afe4 (patch)
tree1b4a23017c2e72c3fcc9d8328cb6d582a860a9c6 /keyboards/planck/keymaps/buffet/rgb_matrix_user.inc
parent7be65f2cd04c90ee5146139509762baa3f286520 (diff)
downloadqmk_firmware-3eefe31a54df07f5624f49632d986dff9725afe4.tar.gz
Keymap: Add custom keymap for Planck (#9417)
* Keymap: Add custom keymap for Planck * Fixup buffet's planck keymap
Diffstat (limited to 'keyboards/planck/keymaps/buffet/rgb_matrix_user.inc')
-rw-r--r--keyboards/planck/keymaps/buffet/rgb_matrix_user.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc b/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc
new file mode 100644
index 000000000..e217d1010
--- /dev/null
+++ b/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc
@@ -0,0 +1,18 @@
+RGB_MATRIX_EFFECT(rainbow_stripe)
+
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV rainbow_stripe_math(HSV hsv, uint8_t i, uint8_t time) {
+ if (i >= 14 && i <= 21) {
+ hsv.h = g_led_config.point[i].x - time;
+ } else {
+ hsv.v = 0;
+ }
+ return hsv;
+}
+
+bool rainbow_stripe(effect_params_t* params) {
+ return effect_runner_i(params, &rainbow_stripe_math);
+}
+
+#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS