diff options
| -rw-r--r-- | keyboards/ergodox/infinity/animations.c | 44 | ||||
| -rw-r--r-- | keyboards/ergodox/infinity/simple_visualizer.h | 2 | ||||
| -rw-r--r-- | keyboards/ergodox/infinity/visualizer.c | 4 | ||||
| -rw-r--r-- | keyboards/whitefox/animations.c | 36 | ||||
| -rw-r--r-- | lcd_backlight_keyframes.h (renamed from quantum/visualizer/lcd_backlight_keyframes.h) | 8 | ||||
| -rw-r--r-- | quantum/visualizer/lcd_backlight_keyframes.c | 8 | ||||
| -rw-r--r-- | quantum/visualizer/led_backlight_keyframes.c (renamed from quantum/visualizer/led_keyframes.c) | 20 | ||||
| -rw-r--r-- | quantum/visualizer/led_backlight_keyframes.h (renamed from quantum/visualizer/led_keyframes.h) | 22 | ||||
| -rw-r--r-- | quantum/visualizer/visualizer.mk | 2 |
9 files changed, 73 insertions, 73 deletions
diff --git a/keyboards/ergodox/infinity/animations.c b/keyboards/ergodox/infinity/animations.c index ebc08fde3..faac96215 100644 --- a/keyboards/ergodox/infinity/animations.c +++ b/keyboards/ergodox/infinity/animations.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | #ifdef BACKLIGHT_ENABLE | 28 | #ifdef BACKLIGHT_ENABLE |
| 29 | #include "led_keyframes.h" | 29 | #include "led_backlight_keyframes.h" |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #include "visualizer_keyframes.h" | 32 | #include "visualizer_keyframes.h" |
| @@ -39,10 +39,10 @@ static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* | |||
| 39 | lcd_keyframe_enable(animation, state); | 39 | lcd_keyframe_enable(animation, state); |
| 40 | #endif | 40 | #endif |
| 41 | #ifdef LCD_BACKLIGHT_ENABLE | 41 | #ifdef LCD_BACKLIGHT_ENABLE |
| 42 | backlight_keyframe_enable(animation, state); | 42 | lcd_backlight_keyframe_enable(animation, state); |
| 43 | #endif | 43 | #endif |
| 44 | #ifdef BACKLIGHT_ENABLE | 44 | #ifdef BACKLIGHT_ENABLE |
| 45 | led_keyframe_enable(animation, state); | 45 | led_backlight_keyframe_enable(animation, state); |
| 46 | #endif | 46 | #endif |
| 47 | return false; | 47 | return false; |
| 48 | } | 48 | } |
| @@ -52,10 +52,10 @@ static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t | |||
| 52 | lcd_keyframe_disable(animation, state); | 52 | lcd_keyframe_disable(animation, state); |
| 53 | #endif | 53 | #endif |
| 54 | #ifdef LCD_BACKLIGHT_ENABLE | 54 | #ifdef LCD_BACKLIGHT_ENABLE |
| 55 | backlight_keyframe_disable(animation, state); | 55 | lcd_backlight_keyframe_disable(animation, state); |
| 56 | #endif | 56 | #endif |
| 57 | #ifdef BACKLIGHT_ENABLE | 57 | #ifdef BACKLIGHT_ENABLE |
| 58 | led_keyframe_disable(animation, state); | 58 | led_backlight_keyframe_disable(animation, state); |
| 59 | #endif | 59 | #endif |
| 60 | return false; | 60 | return false; |
| 61 | } | 61 | } |
| @@ -63,10 +63,10 @@ static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t | |||
| 63 | static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) { | 63 | static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 64 | bool ret = false; | 64 | bool ret = false; |
| 65 | #ifdef LCD_BACKLIGHT_ENABLE | 65 | #ifdef LCD_BACKLIGHT_ENABLE |
| 66 | ret |= backlight_keyframe_animate_color(animation, state); | 66 | ret |= lcd_backlight_keyframe_animate_color(animation, state); |
| 67 | #endif | 67 | #endif |
| 68 | #ifdef BACKLIGHT_ENABLE | 68 | #ifdef BACKLIGHT_ENABLE |
| 69 | ret |= led_keyframe_fade_in_all(animation, state); | 69 | ret |= led_backlight_keyframe_fade_in_all(animation, state); |
| 70 | #endif | 70 | #endif |
| 71 | return ret; | 71 | return ret; |
| 72 | } | 72 | } |
| @@ -74,10 +74,10 @@ static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t | |||
| 74 | static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) { | 74 | static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 75 | bool ret = false; | 75 | bool ret = false; |
| 76 | #ifdef LCD_BACKLIGHT_ENABLE | 76 | #ifdef LCD_BACKLIGHT_ENABLE |
| 77 | ret |= backlight_keyframe_animate_color(animation, state); | 77 | ret |= lcd_backlight_keyframe_animate_color(animation, state); |
| 78 | #endif | 78 | #endif |
| 79 | #ifdef BACKLIGHT_ENABLE | 79 | #ifdef BACKLIGHT_ENABLE |
| 80 | ret |= led_keyframe_fade_out_all(animation, state); | 80 | ret |= led_backlight_keyframe_fade_out_all(animation, state); |
| 81 | #endif | 81 | #endif |
| 82 | return ret; | 82 | return ret; |
| 83 | } | 83 | } |
| @@ -133,20 +133,20 @@ keyframe_animation_t led_test_animation = { | |||
| 133 | 133 | ||
| 134 | }, | 134 | }, |
| 135 | .frame_functions = { | 135 | .frame_functions = { |
| 136 | led_keyframe_fade_in_all, | 136 | led_backlight_keyframe_fade_in_all, |
| 137 | keyframe_no_operation, | 137 | keyframe_no_operation, |
| 138 | led_keyframe_fade_out_all, | 138 | led_backlight_keyframe_fade_out_all, |
| 139 | led_keyframe_crossfade, | 139 | led_backlight_keyframe_crossfade, |
| 140 | led_keyframe_left_to_right_gradient, | 140 | led_backlight_keyframe_left_to_right_gradient, |
| 141 | led_keyframe_crossfade, | 141 | led_backlight_keyframe_crossfade, |
| 142 | led_keyframe_top_to_bottom_gradient, | 142 | led_backlight_keyframe_top_to_bottom_gradient, |
| 143 | led_keyframe_mirror_orientation, | 143 | led_backlight_keyframe_mirror_orientation, |
| 144 | led_keyframe_crossfade, | 144 | led_backlight_keyframe_crossfade, |
| 145 | led_keyframe_left_to_right_gradient, | 145 | led_backlight_keyframe_left_to_right_gradient, |
| 146 | led_keyframe_crossfade, | 146 | led_backlight_keyframe_crossfade, |
| 147 | led_keyframe_top_to_bottom_gradient, | 147 | led_backlight_keyframe_top_to_bottom_gradient, |
| 148 | led_keyframe_normal_orientation, | 148 | led_backlight_keyframe_normal_orientation, |
| 149 | led_keyframe_crossfade, | 149 | led_backlight_keyframe_crossfade, |
| 150 | }, | 150 | }, |
| 151 | }; | 151 | }; |
| 152 | #endif | 152 | #endif |
diff --git a/keyboards/ergodox/infinity/simple_visualizer.h b/keyboards/ergodox/infinity/simple_visualizer.h index ded8a3222..88e96f2af 100644 --- a/keyboards/ergodox/infinity/simple_visualizer.h +++ b/keyboards/ergodox/infinity/simple_visualizer.h | |||
| @@ -58,7 +58,7 @@ static keyframe_animation_t color_animation = { | |||
| 58 | // this prevents the color from changing when activating the layer | 58 | // this prevents the color from changing when activating the layer |
| 59 | // momentarily | 59 | // momentarily |
| 60 | .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, | 60 | .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, |
| 61 | .frame_functions = {keyframe_no_operation, backlight_keyframe_animate_color}, | 61 | .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | void initialize_user_visualizer(visualizer_state_t* state) { | 64 | void initialize_user_visualizer(visualizer_state_t* state) { |
diff --git a/keyboards/ergodox/infinity/visualizer.c b/keyboards/ergodox/infinity/visualizer.c index 5b6b32007..047a1119c 100644 --- a/keyboards/ergodox/infinity/visualizer.c +++ b/keyboards/ergodox/infinity/visualizer.c | |||
| @@ -79,7 +79,7 @@ static keyframe_animation_t one_led_color = { | |||
| 79 | .num_frames = 1, | 79 | .num_frames = 1, |
| 80 | .loop = false, | 80 | .loop = false, |
| 81 | .frame_lengths = {gfxMillisecondsToTicks(0)}, | 81 | .frame_lengths = {gfxMillisecondsToTicks(0)}, |
| 82 | .frame_functions = {backlight_keyframe_set_color}, | 82 | .frame_functions = {lcd_backlight_keyframe_set_color}, |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { | 85 | bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { |
| @@ -94,7 +94,7 @@ static keyframe_animation_t two_led_colors = { | |||
| 94 | .num_frames = 2, | 94 | .num_frames = 2, |
| 95 | .loop = true, | 95 | .loop = true, |
| 96 | .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, | 96 | .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, |
| 97 | .frame_functions = {backlight_keyframe_set_color, swap_led_target_color}, | 97 | .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color}, |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | // The LCD animation alternates between the layer name display and a | 100 | // The LCD animation alternates between the layer name display and a |
diff --git a/keyboards/whitefox/animations.c b/keyboards/whitefox/animations.c index ed1d75efb..a15d46ccd 100644 --- a/keyboards/whitefox/animations.c +++ b/keyboards/whitefox/animations.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include "visualizer.h" | 20 | #include "visualizer.h" |
| 21 | 21 | ||
| 22 | #ifdef BACKLIGHT_ENABLE | 22 | #ifdef BACKLIGHT_ENABLE |
| 23 | #include "led_keyframes.h" | 23 | #include "led_backlight_keyframes.h" |
| 24 | #endif | 24 | #endif |
| 25 | 25 | ||
| 26 | #include "visualizer_keyframes.h" | 26 | #include "visualizer_keyframes.h" |
| @@ -30,14 +30,14 @@ | |||
| 30 | 30 | ||
| 31 | static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { | 31 | static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 32 | #ifdef BACKLIGHT_ENABLE | 32 | #ifdef BACKLIGHT_ENABLE |
| 33 | led_keyframe_enable(animation, state); | 33 | led_backlight_keyframe_enable(animation, state); |
| 34 | #endif | 34 | #endif |
| 35 | return false; | 35 | return false; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { | 38 | static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 39 | #ifdef BACKLIGHT_ENABLE | 39 | #ifdef BACKLIGHT_ENABLE |
| 40 | led_keyframe_disable(animation, state); | 40 | led_backlight_keyframe_disable(animation, state); |
| 41 | #endif | 41 | #endif |
| 42 | return false; | 42 | return false; |
| 43 | } | 43 | } |
| @@ -45,7 +45,7 @@ static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t | |||
| 45 | static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) { | 45 | static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 46 | bool ret = false; | 46 | bool ret = false; |
| 47 | #ifdef BACKLIGHT_ENABLE | 47 | #ifdef BACKLIGHT_ENABLE |
| 48 | ret |= led_keyframe_fade_in_all(animation, state); | 48 | ret |= led_backlight_keyframe_fade_in_all(animation, state); |
| 49 | #endif | 49 | #endif |
| 50 | return ret; | 50 | return ret; |
| 51 | } | 51 | } |
| @@ -53,7 +53,7 @@ static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t | |||
| 53 | static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) { | 53 | static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 54 | bool ret = false; | 54 | bool ret = false; |
| 55 | #ifdef BACKLIGHT_ENABLE | 55 | #ifdef BACKLIGHT_ENABLE |
| 56 | ret |= led_keyframe_fade_out_all(animation, state); | 56 | ret |= led_backlight_keyframe_fade_out_all(animation, state); |
| 57 | #endif | 57 | #endif |
| 58 | return ret; | 58 | return ret; |
| 59 | } | 59 | } |
| @@ -107,20 +107,20 @@ keyframe_animation_t led_test_animation = { | |||
| 107 | 107 | ||
| 108 | }, | 108 | }, |
| 109 | .frame_functions = { | 109 | .frame_functions = { |
| 110 | led_keyframe_fade_in_all, | 110 | led_backlight_keyframe_fade_in_all, |
| 111 | keyframe_no_operation, | 111 | keyframe_no_operation, |
| 112 | led_keyframe_fade_out_all, | 112 | led_backlight_keyframe_fade_out_all, |
| 113 | led_keyframe_crossfade, | 113 | led_backlight_keyframe_crossfade, |
| 114 | led_keyframe_left_to_right_gradient, | 114 | led_backlight_keyframe_left_to_right_gradient, |
| 115 | led_keyframe_crossfade, | 115 | led_backlight_keyframe_crossfade, |
| 116 | led_keyframe_top_to_bottom_gradient, | 116 | led_backlight_keyframe_top_to_bottom_gradient, |
| 117 | led_keyframe_mirror_orientation, | 117 | led_backlight_keyframe_mirror_orientation, |
| 118 | led_keyframe_crossfade, | 118 | led_backlight_keyframe_crossfade, |
| 119 | led_keyframe_left_to_right_gradient, | 119 | led_backlight_keyframe_left_to_right_gradient, |
| 120 | led_keyframe_crossfade, | 120 | led_backlight_keyframe_crossfade, |
| 121 | led_keyframe_top_to_bottom_gradient, | 121 | led_backlight_keyframe_top_to_bottom_gradient, |
| 122 | led_keyframe_normal_orientation, | 122 | led_backlight_keyframe_normal_orientation, |
| 123 | led_keyframe_crossfade, | 123 | led_backlight_keyframe_crossfade, |
| 124 | }, | 124 | }, |
| 125 | }; | 125 | }; |
| 126 | #endif | 126 | #endif |
diff --git a/quantum/visualizer/lcd_backlight_keyframes.h b/lcd_backlight_keyframes.h index e1c125cf9..bde118449 100644 --- a/quantum/visualizer/lcd_backlight_keyframes.h +++ b/lcd_backlight_keyframes.h | |||
| @@ -20,11 +20,11 @@ | |||
| 20 | #include "visualizer.h" | 20 | #include "visualizer.h" |
| 21 | 21 | ||
| 22 | // Animates the LCD backlight color between the current color and the target color (of the state) | 22 | // Animates the LCD backlight color between the current color and the target color (of the state) |
| 23 | bool backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state); | 23 | bool lcd_backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state); |
| 24 | // Sets the backlight color to the target color | 24 | // Sets the backlight color to the target color |
| 25 | bool backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state); | 25 | bool lcd_backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state); |
| 26 | 26 | ||
| 27 | bool backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); | 27 | bool lcd_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); |
| 28 | bool backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); | 28 | bool lcd_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); |
| 29 | 29 | ||
| 30 | #endif /* QUANTUM_VISUALIZER_LCD_BACKLIGHT_KEYFRAMES_H_ */ | 30 | #endif /* QUANTUM_VISUALIZER_LCD_BACKLIGHT_KEYFRAMES_H_ */ |
diff --git a/quantum/visualizer/lcd_backlight_keyframes.c b/quantum/visualizer/lcd_backlight_keyframes.c index 8436d4e3d..8c402baf6 100644 --- a/quantum/visualizer/lcd_backlight_keyframes.c +++ b/quantum/visualizer/lcd_backlight_keyframes.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | #include "lcd_backlight_keyframes.h" | 17 | #include "lcd_backlight_keyframes.h" |
| 18 | 18 | ||
| 19 | bool backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state) { | 19 | bool lcd_backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 20 | int frame_length = animation->frame_lengths[animation->current_frame]; | 20 | int frame_length = animation->frame_lengths[animation->current_frame]; |
| 21 | int current_pos = frame_length - animation->time_left_in_frame; | 21 | int current_pos = frame_length - animation->time_left_in_frame; |
| 22 | uint8_t t_h = LCD_HUE(state->target_lcd_color); | 22 | uint8_t t_h = LCD_HUE(state->target_lcd_color); |
| @@ -49,7 +49,7 @@ bool backlight_keyframe_animate_color(keyframe_animation_t* animation, visualize | |||
| 49 | return true; | 49 | return true; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | bool backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state) { | 52 | bool lcd_backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 53 | (void)animation; | 53 | (void)animation; |
| 54 | state->prev_lcd_color = state->target_lcd_color; | 54 | state->prev_lcd_color = state->target_lcd_color; |
| 55 | state->current_lcd_color = state->target_lcd_color; | 55 | state->current_lcd_color = state->target_lcd_color; |
| @@ -60,14 +60,14 @@ bool backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_st | |||
| 60 | return false; | 60 | return false; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | bool backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { | 63 | bool lcd_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 64 | (void)animation; | 64 | (void)animation; |
| 65 | (void)state; | 65 | (void)state; |
| 66 | lcd_backlight_hal_color(0, 0, 0); | 66 | lcd_backlight_hal_color(0, 0, 0); |
| 67 | return false; | 67 | return false; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | bool backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { | 70 | bool lcd_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 71 | (void)animation; | 71 | (void)animation; |
| 72 | (void)state; | 72 | (void)state; |
| 73 | lcd_backlight_color(LCD_HUE(state->current_lcd_color), | 73 | lcd_backlight_color(LCD_HUE(state->current_lcd_color), |
diff --git a/quantum/visualizer/led_keyframes.c b/quantum/visualizer/led_backlight_keyframes.c index 7e6e5d1ab..d2921a391 100644 --- a/quantum/visualizer/led_keyframes.c +++ b/quantum/visualizer/led_backlight_keyframes.c | |||
| @@ -23,7 +23,7 @@ SOFTWARE. | |||
| 23 | */ | 23 | */ |
| 24 | #include "gfx.h" | 24 | #include "gfx.h" |
| 25 | #include "math.h" | 25 | #include "math.h" |
| 26 | #include "led_keyframes.h" | 26 | #include "led_backlight_keyframes.h" |
| 27 | 27 | ||
| 28 | static uint8_t fade_led_color(keyframe_animation_t* animation, int from, int to) { | 28 | static uint8_t fade_led_color(keyframe_animation_t* animation, int from, int to) { |
| 29 | int frame_length = animation->frame_lengths[animation->current_frame]; | 29 | int frame_length = animation->frame_lengths[animation->current_frame]; |
| @@ -55,19 +55,19 @@ static uint8_t compute_gradient_color(float t, float index, float num) { | |||
| 55 | return (uint8_t)(255.0f * v); | 55 | return (uint8_t)(255.0f * v); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | bool led_keyframe_fade_in_all(keyframe_animation_t* animation, visualizer_state_t* state) { | 58 | bool led_backlight_keyframe_fade_in_all(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 59 | (void)state; | 59 | (void)state; |
| 60 | keyframe_fade_all_leds_from_to(animation, 0, 255); | 60 | keyframe_fade_all_leds_from_to(animation, 0, 255); |
| 61 | return true; | 61 | return true; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | bool led_keyframe_fade_out_all(keyframe_animation_t* animation, visualizer_state_t* state) { | 64 | bool led_backlight_keyframe_fade_out_all(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 65 | (void)state; | 65 | (void)state; |
| 66 | keyframe_fade_all_leds_from_to(animation, 255, 0); | 66 | keyframe_fade_all_leds_from_to(animation, 255, 0); |
| 67 | return true; | 67 | return true; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | bool led_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state) { | 70 | bool led_backlight_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 71 | (void)state; | 71 | (void)state; |
| 72 | float frame_length = animation->frame_lengths[animation->current_frame]; | 72 | float frame_length = animation->frame_lengths[animation->current_frame]; |
| 73 | float current_pos = frame_length - animation->time_left_in_frame; | 73 | float current_pos = frame_length - animation->time_left_in_frame; |
| @@ -79,7 +79,7 @@ bool led_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visual | |||
| 79 | return true; | 79 | return true; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | bool led_keyframe_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state) { | 82 | bool led_backlight_keyframe_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 83 | (void)state; | 83 | (void)state; |
| 84 | float frame_length = animation->frame_lengths[animation->current_frame]; | 84 | float frame_length = animation->frame_lengths[animation->current_frame]; |
| 85 | float current_pos = frame_length - animation->time_left_in_frame; | 85 | float current_pos = frame_length - animation->time_left_in_frame; |
| @@ -98,7 +98,7 @@ static void copy_current_led_state(uint8_t* dest) { | |||
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | } | 100 | } |
| 101 | bool led_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* state) { | 101 | bool led_backlight_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 102 | (void)state; | 102 | (void)state; |
| 103 | if (animation->first_update_of_frame) { | 103 | if (animation->first_update_of_frame) { |
| 104 | copy_current_led_state(&crossfade_start_frame[0][0]); | 104 | copy_current_led_state(&crossfade_start_frame[0][0]); |
| @@ -114,28 +114,28 @@ bool led_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* | |||
| 114 | return true; | 114 | return true; |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | bool led_keyframe_mirror_orientation(keyframe_animation_t* animation, visualizer_state_t* state) { | 117 | bool led_backlight_keyframe_mirror_orientation(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 118 | (void)state; | 118 | (void)state; |
| 119 | (void)animation; | 119 | (void)animation; |
| 120 | gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_180); | 120 | gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_180); |
| 121 | return false; | 121 | return false; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | bool led_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer_state_t* state) { | 124 | bool led_backlight_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 125 | (void)state; | 125 | (void)state; |
| 126 | (void)animation; | 126 | (void)animation; |
| 127 | gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_0); | 127 | gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_0); |
| 128 | return false; | 128 | return false; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | bool led_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { | 131 | bool led_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 132 | (void)state; | 132 | (void)state; |
| 133 | (void)animation; | 133 | (void)animation; |
| 134 | gdispGSetPowerMode(LED_DISPLAY, powerOff); | 134 | gdispGSetPowerMode(LED_DISPLAY, powerOff); |
| 135 | return false; | 135 | return false; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | bool led_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { | 138 | bool led_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { |
| 139 | (void)state; | 139 | (void)state; |
| 140 | (void)animation; | 140 | (void)animation; |
| 141 | gdispGSetPowerMode(LED_DISPLAY, powerOn); | 141 | gdispGSetPowerMode(LED_DISPLAY, powerOn); |
diff --git a/quantum/visualizer/led_keyframes.h b/quantum/visualizer/led_backlight_keyframes.h index a59a4f37d..487151013 100644 --- a/quantum/visualizer/led_keyframes.h +++ b/quantum/visualizer/led_backlight_keyframes.h | |||
| @@ -22,21 +22,21 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
| 22 | SOFTWARE. | 22 | SOFTWARE. |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #ifndef LED_KEYFRAMES_H | 25 | #ifndef LED_BACKLIGHT_KEYFRAMES_H |
| 26 | #define LED_KEYFRAMES_H | 26 | #define LED_BACKLIGHT_KEYFRAMES_H |
| 27 | 27 | ||
| 28 | #include "visualizer.h" | 28 | #include "visualizer.h" |
| 29 | 29 | ||
| 30 | bool led_keyframe_fade_in_all(keyframe_animation_t* animation, visualizer_state_t* state); | 30 | bool led_backlight_keyframe_fade_in_all(keyframe_animation_t* animation, visualizer_state_t* state); |
| 31 | bool led_keyframe_fade_out_all(keyframe_animation_t* animation, visualizer_state_t* state); | 31 | bool led_backlight_keyframe_fade_out_all(keyframe_animation_t* animation, visualizer_state_t* state); |
| 32 | bool led_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state); | 32 | bool led_backlight_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state); |
| 33 | bool led_keyframe_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state); | 33 | bool led_backlight_keyframe_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state); |
| 34 | bool led_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* state); | 34 | bool led_backlight_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* state); |
| 35 | bool led_keyframe_mirror_orientation(keyframe_animation_t* animation, visualizer_state_t* state); | 35 | bool led_backlight_keyframe_mirror_orientation(keyframe_animation_t* animation, visualizer_state_t* state); |
| 36 | bool led_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer_state_t* state); | 36 | bool led_backlight_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer_state_t* state); |
| 37 | 37 | ||
| 38 | bool led_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); | 38 | bool led_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); |
| 39 | bool led_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); | 39 | bool led_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); |
| 40 | 40 | ||
| 41 | extern keyframe_animation_t led_test_animation; | 41 | extern keyframe_animation_t led_test_animation; |
| 42 | 42 | ||
diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk index 1fe7435d9..a04c9775f 100644 --- a/quantum/visualizer/visualizer.mk +++ b/quantum/visualizer/visualizer.mk | |||
| @@ -43,7 +43,7 @@ OPT_DEFS += -DLCD_BACKLIGHT_ENABLE | |||
| 43 | endif | 43 | endif |
| 44 | 44 | ||
| 45 | ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) | 45 | ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) |
| 46 | SRC += $(VISUALIZER_DIR)/led_keyframes.c | 46 | SRC += $(VISUALIZER_DIR)/led_backlight_keyframes.c |
| 47 | endif | 47 | endif |
| 48 | 48 | ||
| 49 | include $(GFXLIB)/gfx.mk | 49 | include $(GFXLIB)/gfx.mk |
