]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - visualizer.h
Add function for running the next keyframe
[qmk_firmware.git] / visualizer.h
index 6a72fde1fd3138ef584aced50db14d751b58452f..5375e0130fbe66f61079bd3eb2eb8b837795d37a 100644 (file)
@@ -95,6 +95,8 @@ 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;
@@ -104,6 +106,9 @@ 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