diff options
author | Joshua Diamond <josh@windowoffire.com> | 2020-05-09 04:56:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 01:56:16 -0700 |
commit | 2fe7e221ec9e412cc008aa5c03eaf27e35ff62c6 (patch) | |
tree | 79ae7e86cfb9048b3bd9795b596ec318581d801e /quantum/rgblight.h | |
parent | e0f548085cc9c29e85122d393e74143eb5de1d4d (diff) | |
download | qmk_firmware-2fe7e221ec9e412cc008aa5c03eaf27e35ff62c6.tar.gz |
New RGB Lighting effect: Twinkle (#8887)
* Add twinkle RGB Lighting effect
* 2nd twinkle algo - double-buffering
* Further refinement: Per-LED twinkle
* Add documentation for Twinkle RBG Lighting mode
* Bias twinkle saturation closer to the set value
* Fix whitespace
Diffstat (limited to 'quantum/rgblight.h')
-rw-r--r-- | quantum/rgblight.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index e06073728..7de9c3f3d 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -59,6 +59,12 @@ | 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 | | 35 | RGBLIGHT_MODE_RGB_TEST | | 36 | RGBLIGHT_MODE_ALTERNATING | +| 37 | RGBLIGHT_MODE_TWINKLE | +| 38 | RGBLIGHT_MODE_TWINKLE + 1 | +| 39 | RGBLIGHT_MODE_TWINKLE + 2 | +| 40 | RGBLIGHT_MODE_TWINKLE + 3 | +| 41 | RGBLIGHT_MODE_TWINKLE + 4 | +| 42 | RGBLIGHT_MODE_TWINKLE + 5 | |-----------------|-----------------------------------| *****/ @@ -73,6 +79,7 @@ # define RGBLIGHT_EFFECT_STATIC_GRADIENT # define RGBLIGHT_EFFECT_RGB_TEST # define RGBLIGHT_EFFECT_ALTERNATING +# define RGBLIGHT_EFFECT_TWINKLE #endif #ifdef RGBLIGHT_STATIC_PATTERNS @@ -89,7 +96,8 @@ || defined(RGBLIGHT_EFFECT_KNIGHT) \ || defined(RGBLIGHT_EFFECT_CHRISTMAS) \ || defined(RGBLIGHT_EFFECT_RGB_TEST) \ - || defined(RGBLIGHT_EFFECT_ALTERNATING) + || defined(RGBLIGHT_EFFECT_ALTERNATING) \ + || defined(RGBLIGHT_EFFECT_TWINKLE) # define RGBLIGHT_USE_TIMER #endif @@ -141,6 +149,14 @@ enum RGBLIGHT_EFFECT_MODE { # define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 # endif +# ifndef RGBLIGHT_EFFECT_TWINKLE_LIFE +# define RGBLIGHT_EFFECT_TWINKLE_LIFE 75 +# endif + +# ifndef RGBLIGHT_EFFECT_TWINKLE_PROBABILITY +# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/127 +# endif + # ifndef RGBLIGHT_HUE_STEP # define RGBLIGHT_HUE_STEP 8 # endif @@ -208,6 +224,7 @@ extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; +extern const uint8_t RGBLED_TWINKLE_INTERVALS[3] PROGMEM; extern bool is_rgblight_initialized; // Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now) @@ -398,6 +415,7 @@ void rgblight_effect_knight(animation_status_t *anim); void rgblight_effect_christmas(animation_status_t *anim); void rgblight_effect_rgbtest(animation_status_t *anim); void rgblight_effect_alternating(animation_status_t *anim); +void rgblight_effect_twinkle(animation_status_t *anim); # endif |