aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ergodox/infinity/animations.c
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-08 23:04:27 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 18:34:59 +0300
commitc5d2b7ff16f81a8061127e0ec636cf9b914725c5 (patch)
tree8a4095bd3ae22fd79384d88416648129bb6176df /keyboards/ergodox/infinity/animations.c
parent306353bf06e5e5a76890ffb0c48a4dcca76c4399 (diff)
downloadqmk_firmware-c5d2b7ff16f81a8061127e0ec636cf9b914725c5.tar.gz
qmk_firmware-c5d2b7ff16f81a8061127e0ec636cf9b914725c5.zip
Rename led test to led_keyframes and move animation to Ergodox
Diffstat (limited to 'keyboards/ergodox/infinity/animations.c')
-rw-r--r--keyboards/ergodox/infinity/animations.c55
1 files changed, 54 insertions, 1 deletions
diff --git a/keyboards/ergodox/infinity/animations.c b/keyboards/ergodox/infinity/animations.c
index 54ab99460..4c9f6d9c8 100644
--- a/keyboards/ergodox/infinity/animations.c
+++ b/keyboards/ergodox/infinity/animations.c
@@ -14,6 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#if defined(VISUALIZER_ENABLE)
18
17#include "animations.h" 19#include "animations.h"
18#include "visualizer.h" 20#include "visualizer.h"
19#ifdef LCD_ENABLE 21#ifdef LCD_ENABLE
@@ -23,7 +25,14 @@
23#include "lcd_backlight_keyframes.h" 25#include "lcd_backlight_keyframes.h"
24#endif 26#endif
25 27
26#if defined(VISUALIZER_ENABLE) && defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE) 28#ifdef LED_ENABLE
29#include "led_keyframes.h"
30#endif
31
32#include "visualizer_keyframes.h"
33
34
35#if defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE)
27 36
28// Don't worry, if the startup animation is long, you can use the keyboard like normal 37// Don't worry, if the startup animation is long, you can use the keyboard like normal
29// during that time 38// during that time
@@ -50,5 +59,49 @@ keyframe_animation_t default_suspend_animation = {
50 backlight_keyframe_disable, 59 backlight_keyframe_disable,
51 }, 60 },
52}; 61};
62#endif
63
64#if defined(LED_ENABLE)
65#define CROSSFADE_TIME 1000
66#define GRADIENT_TIME 3000
67
68keyframe_animation_t led_test_animation = {
69 .num_frames = 14,
70 .loop = true,
71 .frame_lengths = {
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
79 0, // mirror leds
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
84 0, // normal leds
85 gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
86
87 },
88 .frame_functions = {
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,
103 },
104};
105#endif
53 106
54#endif 107#endif