From 23e8adc8b27bf7542fc7fac9e8fbcc7bdf833ea1 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Fri, 9 Jul 2021 17:54:33 -0400 Subject: [PATCH] vialrgb: add all effects --- .../rgb_matrix_animations/breathing_anim.h | 1 + .../colorband_pinwheel_sat_anim.h | 1 + .../colorband_pinwheel_val_anim.h | 1 + .../colorband_sat_anim.h | 1 + .../colorband_spiral_sat_anim.h | 1 + .../colorband_spiral_val_anim.h | 1 + .../colorband_val_anim.h | 1 + .../rgb_matrix_animations/cycle_all_anim.h | 1 + .../cycle_left_right_anim.h | 1 + .../rgb_matrix_animations/cycle_out_in_anim.h | 1 + .../cycle_out_in_dual_anim.h | 1 + .../cycle_pinwheel_anim.h | 1 + .../rgb_matrix_animations/cycle_spiral_anim.h | 1 + .../cycle_up_down_anim.h | 1 + .../rgb_matrix_animations/digital_rain_anim.h | 1 + .../rgb_matrix_animations/dual_beacon_anim.h | 1 + .../gradient_left_right_anim.h | 1 + .../gradient_up_down_anim.h | 1 + .../hue_breathing_anim.h | 1 + .../rgb_matrix_animations/hue_pendulum_anim.h | 1 + quantum/rgb_matrix_animations/hue_wave_anim.h | 1 + .../jellybean_raindrops_anim.h | 1 + .../rainbow_beacon_anim.h | 1 + .../rainbow_moving_chevron_anim.h | 1 + .../rainbow_pinwheels_anim.h | 1 + .../rgb_matrix_animations/raindrops_anim.h | 1 + .../solid_reactive_anim.h | 1 + .../solid_reactive_cross.h | 2 + .../solid_reactive_nexus.h | 2 + .../solid_reactive_simple_anim.h | 1 + .../solid_reactive_wide.h | 2 + .../rgb_matrix_animations/solid_splash_anim.h | 2 + quantum/rgb_matrix_animations/splash_anim.h | 2 + .../typing_heatmap_anim.h | 1 + quantum/vialrgb.c | 53 +----- quantum/vialrgb_effects.inc | 176 ++++++++++++++++++ 36 files changed, 216 insertions(+), 52 deletions(-) create mode 100644 quantum/vialrgb_effects.inc diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h index 340bd93e5d..dbb606eaa6 100644 --- a/quantum/rgb_matrix_animations/breathing_anim.h +++ b/quantum/rgb_matrix_animations/breathing_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BREATHING +#define RGB_MATRIX_EFFECT_BREATHING RGB_MATRIX_EFFECT(BREATHING) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h index 3df3cfda7d..a15fe0f801 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define RGB_MATRIX_EFFECT_BAND_PINWHEEL_SAT RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h index 7d80074fd5..fe4c1b233c 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define RGB_MATRIX_EFFECT_BAND_PINWHEEL_VAL RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h index 35b830af6b..ac93b1ec41 100644 --- a/quantum/rgb_matrix_animations/colorband_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BAND_SAT +#define RGB_MATRIX_EFFECT_BAND_SAT RGB_MATRIX_EFFECT(BAND_SAT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h index 048157aa1b..8a9fe0acea 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define RGB_MATRIX_EFFECT_BAND_SPIRAL_SAT RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h index bff2da1616..aaf5bd2076 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define RGB_MATRIX_EFFECT_BAND_SPIRAL_VAL RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h index f1aaf1d067..7b1c70ec35 100644 --- a/quantum/rgb_matrix_animations/colorband_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_BAND_VAL +#define RGB_MATRIX_EFFECT_BAND_VAL RGB_MATRIX_EFFECT(BAND_VAL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h index faf8598a39..9ca8eecb08 100644 --- a/quantum/rgb_matrix_animations/cycle_all_anim.h +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL +#define RGB_MATRIX_EFFECT_CYCLE_ALL RGB_MATRIX_EFFECT(CYCLE_ALL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h index cf911eb937..eb248172e8 100644 --- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define RGB_MATRIX_EFFECT_CYCLE_LEFT_RIGHT RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h index d66acd4b2b..f51758665d 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#define RGB_MATRIX_EFFECT_CYCLE_OUT_IN RGB_MATRIX_EFFECT(CYCLE_OUT_IN) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h index fe8396140f..f0e9eb199e 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define RGB_MATRIX_EFFECT_CYCLE_OUT_IN_DUAL RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h index 7799887099..ac81b69453 100644 --- a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h +++ b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define RGB_MATRIX_EFFECT_CYCLE_PINWHEEL RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h index 80cfb0dbc7..5d7fd2cff7 100644 --- a/quantum/rgb_matrix_animations/cycle_spiral_anim.h +++ b/quantum/rgb_matrix_animations/cycle_spiral_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL +#define RGB_MATRIX_EFFECT_CYCLE_SPIRAL RGB_MATRIX_EFFECT(CYCLE_SPIRAL) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h index 5016f739d6..d24201d886 100644 --- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define RGB_MATRIX_EFFECT_CYCLE_UP_DOWN RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h index 1de45f8e8d..367c8aaefe 100644 --- a/quantum/rgb_matrix_animations/digital_rain_anim.h +++ b/quantum/rgb_matrix_animations/digital_rain_anim.h @@ -1,4 +1,5 @@ #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) +#define RGB_MATRIX_EFFECT_DIGITAL_RAIN RGB_MATRIX_EFFECT(DIGITAL_RAIN) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index ce94871681..f0fa777596 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON +#define RGB_MATRIX_EFFECT_DUAL_BEACON RGB_MATRIX_EFFECT(DUAL_BEACON) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/gradient_left_right_anim.h b/quantum/rgb_matrix_animations/gradient_left_right_anim.h index 53dfd04e2c..7709cee5ce 100644 --- a/quantum/rgb_matrix_animations/gradient_left_right_anim.h +++ b/quantum/rgb_matrix_animations/gradient_left_right_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define RGB_MATRIX_EFFECT_GRADIENT_LEFT_RIGHT RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h index 7e0d2898cf..d95523ab7f 100644 --- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h +++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define RGB_MATRIX_EFFECT_GRADIENT_UP_DOWN RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/hue_breathing_anim.h b/quantum/rgb_matrix_animations/hue_breathing_anim.h index 54dea958af..74c6087263 100644 --- a/quantum/rgb_matrix_animations/hue_breathing_anim.h +++ b/quantum/rgb_matrix_animations/hue_breathing_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_HUE_BREATHING +#define RGB_MATRIX_EFFECT_HUE_BREATHING RGB_MATRIX_EFFECT(HUE_BREATHING) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/hue_pendulum_anim.h b/quantum/rgb_matrix_animations/hue_pendulum_anim.h index 2d8d36174f..23c3928d9c 100644 --- a/quantum/rgb_matrix_animations/hue_pendulum_anim.h +++ b/quantum/rgb_matrix_animations/hue_pendulum_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM +#define RGB_MATRIX_EFFECT_HUE_PENDULUM RGB_MATRIX_EFFECT(HUE_PENDULUM) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/hue_wave_anim.h b/quantum/rgb_matrix_animations/hue_wave_anim.h index fd9026fc90..2fa717be1a 100644 --- a/quantum/rgb_matrix_animations/hue_wave_anim.h +++ b/quantum/rgb_matrix_animations/hue_wave_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_HUE_WAVE +#define RGB_MATRIX_EFFECT_HUE_WAVE RGB_MATRIX_EFFECT(HUE_WAVE) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h index 9493b38508..1951ce5cdc 100644 --- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define RGB_MATRIX_EFFECT_JELLYBEAN_RAINDROPS RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index 977261182f..f634f4e73a 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON +#define RGB_MATRIX_EFFECT_RAINBOW_BEACON RGB_MATRIX_EFFECT(RAINBOW_BEACON) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h index e51e7b2516..abb5ad8fbb 100644 --- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define RGB_MATRIX_EFFECT_RAINBOW_MOVING_CHEVRON RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index 1cd4ed2acf..b4fff8507b 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define RGB_MATRIX_EFFECT_RAINBOW_PINWHEELS RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h index 38359cdca7..b5e44c6389 100644 --- a/quantum/rgb_matrix_animations/raindrops_anim.h +++ b/quantum/rgb_matrix_animations/raindrops_anim.h @@ -1,4 +1,5 @@ #ifndef DISABLE_RGB_MATRIX_RAINDROPS +#define RGB_MATRIX_EFFECT_RAINDROPS RGB_MATRIX_EFFECT(RAINDROPS) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h index d45bb961bc..ed1d71241e 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h @@ -1,5 +1,6 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE RGB_MATRIX_EFFECT(SOLID_REACTIVE) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h index f76c68e8c7..7cc93919cd 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix_animations/solid_reactive_cross.h @@ -2,10 +2,12 @@ # if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_CROSS RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) # endif # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_MULTICROSS RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) # endif diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h index 17f94e3c18..b7a0d94b76 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix_animations/solid_reactive_nexus.h @@ -2,10 +2,12 @@ # if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_NEXUS RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS) # endif # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_MULTINEXUS RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) # endif diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h index 12eb248cc0..9eb74c7550 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -1,5 +1,6 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_SIMPLE RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h index 1cc4dca728..a0071bef66 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix_animations/solid_reactive_wide.h @@ -2,10 +2,12 @@ # if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_WIDE RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) # endif # ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define RGB_MATRIX_EFFECT_SOLID_REACTIVE_MULTIWIDE RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) # endif diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h index 99efb4996a..c28c712634 100644 --- a/quantum/rgb_matrix_animations/solid_splash_anim.h +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h @@ -2,10 +2,12 @@ # if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) # ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +#define RGB_MATRIX_EFFECT_SOLID_SPLASH RGB_MATRIX_EFFECT(SOLID_SPLASH) # endif # ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define RGB_MATRIX_EFFECT_SOLID_MULTISPLASH RGB_MATRIX_EFFECT(SOLID_MULTISPLASH) # endif diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h index 1415bcc0fa..d2f92a62ea 100644 --- a/quantum/rgb_matrix_animations/splash_anim.h +++ b/quantum/rgb_matrix_animations/splash_anim.h @@ -2,10 +2,12 @@ # if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) # ifndef DISABLE_RGB_MATRIX_SPLASH +#define RGB_MATRIX_EFFECT_SPLASH RGB_MATRIX_EFFECT(SPLASH) # endif # ifndef DISABLE_RGB_MATRIX_MULTISPLASH +#define RGB_MATRIX_EFFECT_MULTISPLASH RGB_MATRIX_EFFECT(MULTISPLASH) # endif diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h index e7dda11a2f..bd1a7b43fd 100644 --- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h +++ b/quantum/rgb_matrix_animations/typing_heatmap_anim.h @@ -1,4 +1,5 @@ #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) +#define RGB_MATRIX_EFFECT_TYPING_HEATMAP RGB_MATRIX_EFFECT(TYPING_HEATMAP) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/vialrgb.c b/quantum/vialrgb.c index 5bec65282e..4216afa65a 100644 --- a/quantum/vialrgb.c +++ b/quantum/vialrgb.c @@ -8,63 +8,12 @@ #include "rgb_matrix.h" #include "vial.h" -/* Note - never reorder or remove these, only add new animations at the end */ -enum { - VIALRGB_EFFECT_OFF = 0, - VIALRGB_EFFECT_DIRECT, - VIALRGB_EFFECT_SOLID_COLOR, - VIALRGB_EFFECT_ALPHAS_MODS, - VIALRGB_EFFECT_GRADIENT_UP_DOWN_ANIM, - VIALRGB_EFFECT_GRADIENT_LEFT_RIGHT_ANIM, - VIALRGB_EFFECT_BREATHING_ANIM, - VIALRGB_EFFECT_COLORBAND_SAT_ANIM, - VIALRGB_EFFECT_COLORBAND_VAL_ANIM, - VIALRGB_EFFECT_COLORBAND_PINWHEEL_SAT_ANIM, - VIALRGB_EFFECT_COLORBAND_PINWHEEL_VAL_ANIM, - VIALRGB_EFFECT_COLORBAND_SPIRAL_SAT_ANIM, - VIALRGB_EFFECT_COLORBAND_SPIRAL_VAL_ANIM, - VIALRGB_EFFECT_CYCLE_ALL_ANIM, - VIALRGB_EFFECT_CYCLE_LEFT_RIGHT_ANIM, - VIALRGB_EFFECT_CYCLE_UP_DOWN_ANIM, - VIALRGB_EFFECT_RAINBOW_MOVING_CHEVRON_ANIM, - VIALRGB_EFFECT_CYCLE_OUT_IN_ANIM, - VIALRGB_EFFECT_CYCLE_OUT_IN_DUAL_ANIM, - VIALRGB_EFFECT_CYCLE_PINWHEEL_ANIM, - VIALRGB_EFFECT_CYCLE_SPIRAL_ANIM, - VIALRGB_EFFECT_DUAL_BEACON_ANIM, - VIALRGB_EFFECT_RAINBOW_BEACON_ANIM, - VIALRGB_EFFECT_RAINBOW_PINWHEELS_ANIM, - VIALRGB_EFFECT_RAINDROPS_ANIM, - VIALRGB_EFFECT_JELLYBEAN_RAINDROPS_ANIM, - VIALRGB_EFFECT_HUE_BREATHING_ANIM, - VIALRGB_EFFECT_HUE_PENDULUM_ANIM, - VIALRGB_EFFECT_HUE_WAVE_ANIM, - VIALRGB_EFFECT_TYPING_HEATMAP_ANIM, - VIALRGB_EFFECT_DIGITAL_RAIN_ANIM, - VIALRGB_EFFECT_SOLID_REACTIVE_SIMPLE_ANIM, - VIALRGB_EFFECT_SOLID_REACTIVE_ANIM, - VIALRGB_EFFECT_SOLID_REACTIVE_WIDE, - VIALRGB_EFFECT_SOLID_REACTIVE_CROSS, - VIALRGB_EFFECT_SOLID_REACTIVE_NEXUS, - VIALRGB_EFFECT_SPLASH_ANIM, - VIALRGB_EFFECT_SOLID_SPLASH_ANIM, -}; - typedef struct { uint16_t vialrgb_id; uint16_t qmk_id; } vialrgb_supported_mode_t; -static const PROGMEM vialrgb_supported_mode_t supported_modes[] = { - { VIALRGB_EFFECT_OFF, 0 }, - // { VIALRGB_EFFECT_DIRECT, 0 }, TODO -#ifdef RGB_MATRIX_EFFECT_SOLID_COLOR - { VIALRGB_EFFECT_SOLID_COLOR, RGB_MATRIX_SOLID_COLOR }, -#endif -#ifdef RGB_MATRIX_EFFECT_ALPHAS_MODS - { VIALRGB_EFFECT_ALPHAS_MODS, RGB_MATRIX_ALPHAS_MODS }, -#endif -}; +#include "vialrgb_effects.inc" #define SUPPORTED_MODES_LENGTH (sizeof(supported_modes)/sizeof(*supported_modes)) diff --git a/quantum/vialrgb_effects.inc b/quantum/vialrgb_effects.inc new file mode 100644 index 0000000000..efe8f66de3 --- /dev/null +++ b/quantum/vialrgb_effects.inc @@ -0,0 +1,176 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* Note - never reorder or remove these, only add new animations at the end */ +enum { + VIALRGB_EFFECT_OFF = 0, + VIALRGB_EFFECT_DIRECT, + VIALRGB_EFFECT_SOLID_COLOR, + VIALRGB_EFFECT_ALPHAS_MODS, + VIALRGB_EFFECT_GRADIENT_UP_DOWN, + VIALRGB_EFFECT_GRADIENT_LEFT_RIGHT, + VIALRGB_EFFECT_BREATHING, + VIALRGB_EFFECT_BAND_SAT, + VIALRGB_EFFECT_BAND_VAL, + VIALRGB_EFFECT_BAND_PINWHEEL_SAT, + VIALRGB_EFFECT_BAND_PINWHEEL_VAL, + VIALRGB_EFFECT_BAND_SPIRAL_SAT, + VIALRGB_EFFECT_BAND_SPIRAL_VAL, + VIALRGB_EFFECT_CYCLE_ALL, + VIALRGB_EFFECT_CYCLE_LEFT_RIGHT, + VIALRGB_EFFECT_CYCLE_UP_DOWN, + VIALRGB_EFFECT_RAINBOW_MOVING_CHEVRON, + VIALRGB_EFFECT_CYCLE_OUT_IN, + VIALRGB_EFFECT_CYCLE_OUT_IN_DUAL, + VIALRGB_EFFECT_CYCLE_PINWHEEL, + VIALRGB_EFFECT_CYCLE_SPIRAL, + VIALRGB_EFFECT_DUAL_BEACON, + VIALRGB_EFFECT_RAINBOW_BEACON, + VIALRGB_EFFECT_RAINBOW_PINWHEELS, + VIALRGB_EFFECT_RAINDROPS, + VIALRGB_EFFECT_JELLYBEAN_RAINDROPS, + VIALRGB_EFFECT_HUE_BREATHING, + VIALRGB_EFFECT_HUE_PENDULUM, + VIALRGB_EFFECT_HUE_WAVE, + VIALRGB_EFFECT_TYPING_HEATMAP, + VIALRGB_EFFECT_DIGITAL_RAIN, + VIALRGB_EFFECT_SOLID_REACTIVE_SIMPLE, + VIALRGB_EFFECT_SOLID_REACTIVE, + VIALRGB_EFFECT_SOLID_REACTIVE_WIDE, + VIALRGB_EFFECT_SOLID_REACTIVE_MULTIWIDE, + VIALRGB_EFFECT_SOLID_REACTIVE_CROSS, + VIALRGB_EFFECT_SOLID_REACTIVE_MULTICROSS, + VIALRGB_EFFECT_SOLID_REACTIVE_NEXUS, + VIALRGB_EFFECT_SOLID_REACTIVE_MULTINEXUS, + VIALRGB_EFFECT_SPLASH, + VIALRGB_EFFECT_MULTISPLASH, + VIALRGB_EFFECT_SOLID_SPLASH, + VIALRGB_EFFECT_SOLID_MULTISPLASH, +}; + +static const PROGMEM vialrgb_supported_mode_t supported_modes[] = { + { VIALRGB_EFFECT_OFF, 0 }, + // { VIALRGB_EFFECT_DIRECT, 0 }, TODO +#ifdef RGB_MATRIX_EFFECT_SOLID_COLOR + { VIALRGB_EFFECT_SOLID_COLOR, RGB_MATRIX_SOLID_COLOR }, +#endif +#ifdef RGB_MATRIX_EFFECT_ALPHAS_MODS + { VIALRGB_EFFECT_ALPHAS_MODS, RGB_MATRIX_ALPHAS_MODS }, +#endif +#ifdef RGB_MATRIX_EFFECT_GRADIENT_UP_DOWN + { VIALRGB_EFFECT_GRADIENT_UP_DOWN, RGB_MATRIX_GRADIENT_UP_DOWN }, +#endif +#ifdef RGB_MATRIX_EFFECT_GRADIENT_LEFT_RIGHT + { VIALRGB_EFFECT_GRADIENT_LEFT_RIGHT, RGB_MATRIX_GRADIENT_LEFT_RIGHT }, +#endif +#ifdef RGB_MATRIX_EFFECT_BREATHING + { VIALRGB_EFFECT_BREATHING, RGB_MATRIX_BREATHING }, +#endif +#ifdef RGB_MATRIX_EFFECT_BAND_SAT + { VIALRGB_EFFECT_BAND_SAT, RGB_MATRIX_BAND_SAT }, +#endif +#ifdef RGB_MATRIX_EFFECT_BAND_VAL + { VIALRGB_EFFECT_BAND_VAL, RGB_MATRIX_BAND_VAL }, +#endif +#ifdef RGB_MATRIX_EFFECT_BAND_PINWHEEL_SAT + { VIALRGB_EFFECT_BAND_PINWHEEL_SAT, RGB_MATRIX_BAND_PINWHEEL_SAT }, +#endif +#ifdef RGB_MATRIX_EFFECT_BAND_PINWHEEL_VAL + { VIALRGB_EFFECT_BAND_PINWHEEL_VAL, RGB_MATRIX_BAND_PINWHEEL_VAL }, +#endif +#ifdef RGB_MATRIX_EFFECT_BAND_SPIRAL_SAT + { VIALRGB_EFFECT_BAND_SPIRAL_SAT, RGB_MATRIX_BAND_SPIRAL_SAT }, +#endif +#ifdef RGB_MATRIX_EFFECT_BAND_SPIRAL_VAL + { VIALRGB_EFFECT_BAND_SPIRAL_VAL, RGB_MATRIX_BAND_SPIRAL_VAL }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_ALL + { VIALRGB_EFFECT_CYCLE_ALL, RGB_MATRIX_CYCLE_ALL }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_LEFT_RIGHT + { VIALRGB_EFFECT_CYCLE_LEFT_RIGHT, RGB_MATRIX_CYCLE_LEFT_RIGHT }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_UP_DOWN + { VIALRGB_EFFECT_CYCLE_UP_DOWN, RGB_MATRIX_CYCLE_UP_DOWN }, +#endif +#ifdef RGB_MATRIX_EFFECT_RAINBOW_MOVING_CHEVRON + { VIALRGB_EFFECT_RAINBOW_MOVING_CHEVRON, RGB_MATRIX_RAINBOW_MOVING_CHEVRON }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_OUT_IN + { VIALRGB_EFFECT_CYCLE_OUT_IN, RGB_MATRIX_CYCLE_OUT_IN }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_OUT_IN_DUAL + { VIALRGB_EFFECT_CYCLE_OUT_IN_DUAL, RGB_MATRIX_CYCLE_OUT_IN_DUAL }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_PINWHEEL + { VIALRGB_EFFECT_CYCLE_PINWHEEL, RGB_MATRIX_CYCLE_PINWHEEL }, +#endif +#ifdef RGB_MATRIX_EFFECT_CYCLE_SPIRAL + { VIALRGB_EFFECT_CYCLE_SPIRAL, RGB_MATRIX_CYCLE_SPIRAL }, +#endif +#ifdef RGB_MATRIX_EFFECT_DUAL_BEACON + { VIALRGB_EFFECT_DUAL_BEACON, RGB_MATRIX_DUAL_BEACON }, +#endif +#ifdef RGB_MATRIX_EFFECT_RAINBOW_BEACON + { VIALRGB_EFFECT_RAINBOW_BEACON, RGB_MATRIX_RAINBOW_BEACON }, +#endif +#ifdef RGB_MATRIX_EFFECT_RAINBOW_PINWHEELS + { VIALRGB_EFFECT_RAINBOW_PINWHEELS, RGB_MATRIX_RAINBOW_PINWHEELS }, +#endif +#ifdef RGB_MATRIX_EFFECT_RAINDROPS + { VIALRGB_EFFECT_RAINDROPS, RGB_MATRIX_RAINDROPS }, +#endif +#ifdef RGB_MATRIX_EFFECT_JELLYBEAN_RAINDROPS + { VIALRGB_EFFECT_JELLYBEAN_RAINDROPS, RGB_MATRIX_JELLYBEAN_RAINDROPS }, +#endif +#ifdef RGB_MATRIX_EFFECT_HUE_BREATHING + { VIALRGB_EFFECT_HUE_BREATHING, RGB_MATRIX_HUE_BREATHING }, +#endif +#ifdef RGB_MATRIX_EFFECT_HUE_PENDULUM + { VIALRGB_EFFECT_HUE_PENDULUM, RGB_MATRIX_HUE_PENDULUM }, +#endif +#ifdef RGB_MATRIX_EFFECT_HUE_WAVE + { VIALRGB_EFFECT_HUE_WAVE, RGB_MATRIX_HUE_WAVE }, +#endif +#ifdef RGB_MATRIX_EFFECT_TYPING_HEATMAP + { VIALRGB_EFFECT_TYPING_HEATMAP, RGB_MATRIX_TYPING_HEATMAP }, +#endif +#ifdef RGB_MATRIX_EFFECT_DIGITAL_RAIN + { VIALRGB_EFFECT_DIGITAL_RAIN, RGB_MATRIX_DIGITAL_RAIN }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_SIMPLE + { VIALRGB_EFFECT_SOLID_REACTIVE_SIMPLE, RGB_MATRIX_SOLID_REACTIVE_SIMPLE }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE + { VIALRGB_EFFECT_SOLID_REACTIVE, RGB_MATRIX_SOLID_REACTIVE }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_WIDE + { VIALRGB_EFFECT_SOLID_REACTIVE_WIDE, RGB_MATRIX_SOLID_REACTIVE_WIDE }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_MULTIWIDE + { VIALRGB_EFFECT_SOLID_REACTIVE_MULTIWIDE, RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_CROSS + { VIALRGB_EFFECT_SOLID_REACTIVE_CROSS, RGB_MATRIX_SOLID_REACTIVE_CROSS }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_MULTICROSS + { VIALRGB_EFFECT_SOLID_REACTIVE_MULTICROSS, RGB_MATRIX_SOLID_REACTIVE_MULTICROSS }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_NEXUS + { VIALRGB_EFFECT_SOLID_REACTIVE_NEXUS, RGB_MATRIX_SOLID_REACTIVE_NEXUS }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_REACTIVE_MULTINEXUS + { VIALRGB_EFFECT_SOLID_REACTIVE_MULTINEXUS, RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS }, +#endif +#ifdef RGB_MATRIX_EFFECT_SPLASH + { VIALRGB_EFFECT_SPLASH, RGB_MATRIX_SPLASH }, +#endif +#ifdef RGB_MATRIX_EFFECT_MULTISPLASH + { VIALRGB_EFFECT_MULTISPLASH, RGB_MATRIX_MULTISPLASH }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_SPLASH + { VIALRGB_EFFECT_SOLID_SPLASH, RGB_MATRIX_SOLID_SPLASH }, +#endif +#ifdef RGB_MATRIX_EFFECT_SOLID_MULTISPLASH + { VIALRGB_EFFECT_SOLID_MULTISPLASH, RGB_MATRIX_SOLID_MULTISPLASH }, +#endif +};