diff options
| -rw-r--r-- | docs/feature_rgb_matrix.md | 1 | ||||
| -rw-r--r-- | keyboards/model01/keymaps/dshields/config.h | 1 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/dshields/config.h | 1 | ||||
| -rw-r--r-- | quantum/rgb_matrix.c | 8 |
4 files changed, 9 insertions, 2 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 4f827f8dc..809d034bd 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
| @@ -140,6 +140,7 @@ These are the effects that are currently available: | |||
| 140 | RGB_MATRIX_RAINBOW_PINWHEELS, | 140 | RGB_MATRIX_RAINBOW_PINWHEELS, |
| 141 | RGB_MATRIX_RAINBOW_MOVING_CHEVRON, | 141 | RGB_MATRIX_RAINBOW_MOVING_CHEVRON, |
| 142 | RGB_MATRIX_JELLYBEAN_RAINDROPS, | 142 | RGB_MATRIX_JELLYBEAN_RAINDROPS, |
| 143 | RGB_MATRIX_DIGITAL_RAIN, | ||
| 143 | #ifdef RGB_MATRIX_KEYPRESSES | 144 | #ifdef RGB_MATRIX_KEYPRESSES |
| 144 | RGB_MATRIX_SOLID_REACTIVE, | 145 | RGB_MATRIX_SOLID_REACTIVE, |
| 145 | RGB_MATRIX_SPLASH, | 146 | RGB_MATRIX_SPLASH, |
diff --git a/keyboards/model01/keymaps/dshields/config.h b/keyboards/model01/keymaps/dshields/config.h index 4d609e436..4de2d3cbb 100644 --- a/keyboards/model01/keymaps/dshields/config.h +++ b/keyboards/model01/keymaps/dshields/config.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #define RGB_DIGITAL_RAIN_DROPS 18 | ||
| 3 | #define USB_MAX_POWER_CONSUMPTION 100 | 4 | #define USB_MAX_POWER_CONSUMPTION 100 |
| 4 | #define ONESHOT_TAP_TOGGLE 2 | 5 | #define ONESHOT_TAP_TOGGLE 2 |
| 5 | #define ONESHOT_TIMEOUT 3000 | 6 | #define ONESHOT_TIMEOUT 3000 |
diff --git a/keyboards/planck/keymaps/dshields/config.h b/keyboards/planck/keymaps/dshields/config.h index b149530b8..512e2fbc6 100644 --- a/keyboards/planck/keymaps/dshields/config.h +++ b/keyboards/planck/keymaps/dshields/config.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #define RGB_DIGITAL_RAIN_DROPS 24 | ||
| 3 | #define USB_MAX_POWER_CONSUMPTION 100 | 4 | #define USB_MAX_POWER_CONSUMPTION 100 |
| 4 | #define ONESHOT_TAP_TOGGLE 2 | 5 | #define ONESHOT_TAP_TOGGLE 2 |
| 5 | #define ONESHOT_TIMEOUT 3000 | 6 | #define ONESHOT_TIMEOUT 3000 |
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index b282284a1..f0c2ddfdf 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -50,6 +50,11 @@ rgb_config_t rgb_matrix_config; | |||
| 50 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 | 50 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 |
| 51 | #endif | 51 | #endif |
| 52 | 52 | ||
| 53 | #ifndef RGB_DIGITAL_RAIN_DROPS | ||
| 54 | // lower the number for denser effect/wider keyboard | ||
| 55 | #define RGB_DIGITAL_RAIN_DROPS 24 | ||
| 56 | #endif | ||
| 57 | |||
| 53 | bool g_suspend_state = false; | 58 | bool g_suspend_state = false; |
| 54 | 59 | ||
| 55 | // Global tick at 20 Hz | 60 | // Global tick at 20 Hz |
| @@ -466,7 +471,6 @@ void rgb_matrix_jellybean_raindrops( bool initialize ) { | |||
| 466 | void rgb_matrix_digital_rain( const bool initialize ) { | 471 | void rgb_matrix_digital_rain( const bool initialize ) { |
| 467 | // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain | 472 | // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain |
| 468 | const uint8_t drop_ticks = 28; | 473 | const uint8_t drop_ticks = 28; |
| 469 | const uint8_t new_drop_probability = 24; | ||
| 470 | const uint8_t pure_green_intensity = 0xd0; | 474 | const uint8_t pure_green_intensity = 0xd0; |
| 471 | const uint8_t max_brightness_boost = 0xc0; | 475 | const uint8_t max_brightness_boost = 0xc0; |
| 472 | const uint8_t max_intensity = 0xff; | 476 | const uint8_t max_intensity = 0xff; |
| @@ -481,7 +485,7 @@ void rgb_matrix_digital_rain( const bool initialize ) { | |||
| 481 | } | 485 | } |
| 482 | for (uint8_t col = 0; col < MATRIX_COLS; col++) { | 486 | for (uint8_t col = 0; col < MATRIX_COLS; col++) { |
| 483 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | 487 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { |
| 484 | if (row == 0 && drop == 0 && rand() < RAND_MAX / new_drop_probability) { | 488 | if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) { |
| 485 | // top row, pixels have just fallen and we're | 489 | // top row, pixels have just fallen and we're |
| 486 | // making a new rain drop in this column | 490 | // making a new rain drop in this column |
| 487 | map[col][row] = max_intensity; | 491 | map[col][row] = max_intensity; |
