summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-05 08:48:30 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 18:34:59 +0300
commit5ba228b684a32c1099efc6207842a56ff102961a (patch)
treea68e2930b8dc1d661e097574b5a51ff49b465216 /keyboards
parent5815c5d317b02d688990980fdf01848e81247c21 (diff)
Move LCD backlight keyframes to its own file
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/ergodox/infinity/visualizer.c11
-rw-r--r--keyboards/ergodox/keymaps/default/visualizer.c9
2 files changed, 11 insertions, 9 deletions
diff --git a/keyboards/ergodox/infinity/visualizer.c b/keyboards/ergodox/infinity/visualizer.c
index 3abed08db0..bbed4e9897 100644
--- a/keyboards/ergodox/infinity/visualizer.c
+++ b/keyboards/ergodox/infinity/visualizer.c
@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "visualizer.h"
#include "lcd_keyframes.h"
+#include "lcd_backlight_keyframes.h"
#include "system/serial_link.h"
// To generate an image array like this
@@ -140,7 +141,7 @@ static keyframe_animation_t startup_animation = {
.frame_lengths = {0, gfxMillisecondsToTicks(10000), 0},
.frame_functions = {
display_logo,
- keyframe_animate_backlight_color,
+ backlight_keyframe_animate_color,
enable_visualization
},
};
@@ -150,7 +151,7 @@ static keyframe_animation_t one_led_color = {
.num_frames = 1,
.loop = false,
.frame_lengths = {gfxMillisecondsToTicks(0)},
- .frame_functions = {keyframe_set_backlight_color},
+ .frame_functions = {backlight_keyframe_set_color},
};
bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) {
@@ -165,7 +166,7 @@ static keyframe_animation_t two_led_colors = {
.num_frames = 2,
.loop = true,
.frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)},
- .frame_functions = {keyframe_set_backlight_color, swap_led_target_color},
+ .frame_functions = {backlight_keyframe_set_color, swap_led_target_color},
};
// The LCD animation alternates between the layer name display and a
@@ -190,7 +191,7 @@ static keyframe_animation_t suspend_animation = {
.frame_lengths = {0, gfxMillisecondsToTicks(1000), 0},
.frame_functions = {
lcd_keyframe_display_layer_text,
- keyframe_animate_backlight_color,
+ backlight_keyframe_animate_color,
keyframe_disable_lcd_and_backlight,
},
};
@@ -202,7 +203,7 @@ static keyframe_animation_t resume_animation = {
.frame_functions = {
keyframe_enable_lcd_and_backlight,
display_logo,
- keyframe_animate_backlight_color,
+ backlight_keyframe_animate_color,
enable_visualization,
},
};
diff --git a/keyboards/ergodox/keymaps/default/visualizer.c b/keyboards/ergodox/keymaps/default/visualizer.c
index ef87ac4195..07f5a44ab3 100644
--- a/keyboards/ergodox/keymaps/default/visualizer.c
+++ b/keyboards/ergodox/keymaps/default/visualizer.c
@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "visualizer.h"
#include "lcd_keyframes.h"
+#include "lcd_backlight_keyframes.h"
#include "system/serial_link.h"
#include "led.h"
@@ -114,7 +115,7 @@ static keyframe_animation_t startup_animation = {
.frame_lengths = {0, gfxMillisecondsToTicks(10000), 0},
.frame_functions = {
display_logo,
- keyframe_animate_backlight_color,
+ backlight_keyframe_animate_color,
enable_visualization
},
};
@@ -132,7 +133,7 @@ static keyframe_animation_t suspend_animation = {
.frame_lengths = {0, gfxMillisecondsToTicks(1000), 0},
.frame_functions = {
lcd_keyframe_display_layer_text,
- keyframe_animate_backlight_color,
+ backlight_keyframe_animate_color,
keyframe_disable_lcd_and_backlight,
},
};
@@ -144,7 +145,7 @@ static keyframe_animation_t resume_animation = {
.frame_functions = {
keyframe_enable_lcd_and_backlight,
display_logo,
- keyframe_animate_backlight_color,
+ backlight_keyframe_animate_color,
enable_visualization,
},
};
@@ -157,7 +158,7 @@ static keyframe_animation_t color_animation = {
// this prevents the color from changing when activating the layer
// momentarily
.frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)},
- .frame_functions = {keyframe_no_operation, keyframe_animate_backlight_color},
+ .frame_functions = {keyframe_no_operation, backlight_keyframe_animate_color},
};
void initialize_user_visualizer(visualizer_state_t* state) {