diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-04-24 16:26:53 +0300 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-04-24 16:26:53 +0300 |
commit | 15906b86ae1db858b38bc77393e31e7741223b01 (patch) | |
tree | c5f4f48a845bc076662f9738ab45855b37b52236 /visualizer.c | |
parent | 0530ebb77d6961a7edc14f3a5b943165a8b52497 (diff) |
LEDS are flushed automatically
After running the animation, instead of having to do it manually.
This avoids duplicate flushing, and better support for cross-fades.
Diffstat (limited to 'visualizer.c')
-rw-r--r-- | visualizer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/visualizer.c b/visualizer.c index 2ec6e34f58..81ec8298fd 100644 --- a/visualizer.c +++ b/visualizer.c @@ -127,6 +127,7 @@ void stop_all_keyframe_animations(void) { } static bool update_keyframe_animation(keyframe_animation_t* animation, visualizer_state_t* state, systime_t delta, systime_t* sleep_time) { + // TODO: Clean up this messy code dprintf("Animation frame%d, left %d, delta %d\n", animation->current_frame, animation->time_left_in_frame, delta); if (animation->current_frame == animation->num_frames) { @@ -394,6 +395,9 @@ static THD_FUNCTION(visualizerThread, arg) { update_keyframe_animation(animations[i], &state, delta, &sleep_time); } } +#ifdef LED_ENABLE + gdispGFlush(LED_DISPLAY); +#endif // The animation can enable the visualizer // And we might need to update the state when that happens // so don't sleep |