summaryrefslogtreecommitdiff
path: root/visualizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'visualizer.h')
-rw-r--r--visualizer.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/visualizer.h b/visualizer.h
index 22798cda6b..8a2772c6da 100644
--- a/visualizer.h
+++ b/visualizer.h
@@ -45,8 +45,8 @@ void visualizer_suspend(void);
// This should be called when the keyboard wakes up from suspend state
void visualizer_resume(void);
-// If you need support for more than 8 keyframes per animation, you can change this
-#define MAX_VISUALIZER_KEY_FRAMES 8
+// If you need support for more than 16 keyframes per animation, you can change this
+#define MAX_VISUALIZER_KEY_FRAMES 16
struct keyframe_animation_t;
@@ -95,12 +95,20 @@ typedef struct keyframe_animation_t {
// keyframe update functions
int current_frame;
int time_left_in_frame;
+ bool first_update_of_frame;
+ bool last_update_of_frame;
bool need_update;
} keyframe_animation_t;
+extern GDisplay* LCD_DISPLAY;
+extern GDisplay* LED_DISPLAY;
+
void start_keyframe_animation(keyframe_animation_t* animation);
void stop_keyframe_animation(keyframe_animation_t* animation);
+// This runs the next keyframe, but does not update the animation state
+// Useful for crossfades for example
+void run_next_keyframe(keyframe_animation_t* animation, visualizer_state_t* state);
// Some predefined keyframe functions that can be used by the user code
// Does nothing, useful for adding delays