From 357a888d805c21c9cb4917f55d558195e8b85db5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 15 Jun 2020 03:41:28 -0700 Subject: [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 --- users/drashna/rgb_matrix_stuff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users/drashna/rgb_matrix_stuff.c') diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c index 0914aab144..c9c3224fa5 100644 --- a/users/drashna/rgb_matrix_stuff.c +++ b/users/drashna/rgb_matrix_stuff.c @@ -12,14 +12,14 @@ static uint32_t hypno_timer; void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { HSV hsv = {hue, sat, val}; - if (hsv.v > rgb_matrix_config.hsv.v) { - hsv.v = rgb_matrix_config.hsv.v; + if (hsv.v > rgb_matrix_get_val()) { + hsv.v = rgb_matrix_get_val(); } switch (mode) { case 1: // breathing { - uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); + uint16_t time = scale16by8(g_rgb_timer, speed / 8); hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); RGB rgb = hsv_to_rgb(hsv); for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { -- cgit v1.2.3