summaryrefslogtreecommitdiffstats
path: root/users/drashna/rgb_matrix_stuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/rgb_matrix_stuff.c')
-rw-r--r--users/drashna/rgb_matrix_stuff.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index 9e9e1e4279..5adbd8ab1b 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -34,27 +34,27 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
switch (mode) {
case 1: // breathing
- {
- 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++) {
- if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
- RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
+ {
+ 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++) {
+ if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
+ }
}
+ break;
}
- break;
- }
default: // Solid Color
- {
- RGB rgb = hsv_to_rgb(hsv);
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
- RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
+ {
+ RGB rgb = hsv_to_rgb(hsv);
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
+ }
}
+ break;
}
- break;
- }
}
}