1 /* Copyright 2017 Fred Sundvik
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #if defined(VISUALIZER_ENABLE)
19 #include "animations.h"
20 #include "visualizer.h"
22 #include "lcd_keyframes.h"
24 #ifdef LCD_BACKLIGHT_ENABLE
25 #include "lcd_backlight_keyframes.h"
29 #include "led_keyframes.h"
32 #include "visualizer_keyframes.h"
35 #if defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE)
37 // Don't worry, if the startup animation is long, you can use the keyboard like normal
39 keyframe_animation_t default_startup_animation = {
42 .frame_lengths = {0, 0, 0, gfxMillisecondsToTicks(5000), 0},
45 backlight_keyframe_enable,
46 lcd_keyframe_draw_logo,
47 backlight_keyframe_animate_color,
51 keyframe_animation_t default_suspend_animation = {
54 .frame_lengths = {0, gfxMillisecondsToTicks(1000), 0, 0},
56 lcd_keyframe_display_layer_text,
57 backlight_keyframe_animate_color,
59 backlight_keyframe_disable,
64 #if defined(LED_ENABLE)
65 #define CROSSFADE_TIME 1000
66 #define GRADIENT_TIME 3000
68 keyframe_animation_t led_test_animation = {
72 gfxMillisecondsToTicks(1000), // fade in
73 gfxMillisecondsToTicks(1000), // no op (leds on)
74 gfxMillisecondsToTicks(1000), // fade out
75 gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
76 gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in)
77 gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
78 gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
80 gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
81 gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out)
82 gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
83 gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
85 gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
89 led_keyframe_fade_in_all,
90 keyframe_no_operation,
91 led_keyframe_fade_out_all,
92 led_keyframe_crossfade,
93 led_keyframe_left_to_right_gradient,
94 led_keyframe_crossfade,
95 led_keyframe_top_to_bottom_gradient,
96 led_keyframe_mirror_orientation,
97 led_keyframe_crossfade,
98 led_keyframe_left_to_right_gradient,
99 led_keyframe_crossfade,
100 led_keyframe_top_to_bottom_gradient,
101 led_keyframe_normal_orientation,
102 led_keyframe_crossfade,