aboutsummaryrefslogtreecommitdiff
path: root/users/drashna/rgb_matrix_stuff.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-06-15 03:41:28 -0700
committerGitHub <noreply@github.com>2020-06-15 03:41:28 -0700
commit357a888d805c21c9cb4917f55d558195e8b85db5 (patch)
treefd1e8c30c3754ff89e8efd7e94ced3a1a8d92035 /users/drashna/rgb_matrix_stuff.c
parent7f5656996ca2f5a62a148ef9165d0681ba806f07 (diff)
downloadqmk_firmware-357a888d805c21c9cb4917f55d558195e8b85db5.tar.gz
qmk_firmware-357a888d805c21c9cb4917f55d558195e8b85db5.zip
[Keymap] Drashna's Keymap Update - Display Edition (#9282)
OLED Display fixes Add support for RGBLIGHT Layers Add gaming layer to corn and kyria RGBLight Startup Animation fixes and improvements (uses matrix_scan now!) Pimoroni Trackball support added (IT'S RGB!!!) Fix issues due to code changes
Diffstat (limited to 'users/drashna/rgb_matrix_stuff.c')
-rw-r--r--users/drashna/rgb_matrix_stuff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index 0914aab14..c9c3224fa 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -12,14 +12,14 @@ static uint32_t hypno_timer;
12 12
13void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { 13void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) {
14 HSV hsv = {hue, sat, val}; 14 HSV hsv = {hue, sat, val};
15 if (hsv.v > rgb_matrix_config.hsv.v) { 15 if (hsv.v > rgb_matrix_get_val()) {
16 hsv.v = rgb_matrix_config.hsv.v; 16 hsv.v = rgb_matrix_get_val();
17 } 17 }
18 18
19 switch (mode) { 19 switch (mode) {
20 case 1: // breathing 20 case 1: // breathing
21 { 21 {
22 uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); 22 uint16_t time = scale16by8(g_rgb_timer, speed / 8);
23 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 23 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
24 RGB rgb = hsv_to_rgb(hsv); 24 RGB rgb = hsv_to_rgb(hsv);
25 for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { 25 for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {