diff --git a/examples/rgb_display_pillow_animated_gif.py b/examples/rgb_display_pillow_animated_gif.py index 92254ee..2df2423 100644 --- a/examples/rgb_display_pillow_animated_gif.py +++ b/examples/rgb_display_pillow_animated_gif.py @@ -139,11 +139,14 @@ def play(self): for frame_object in self._frames: start_time = time.monotonic() self.display.image(frame_object.image) + # If the user pressed a button, give them time (0.5s) to release it if not self.advance_button.value: self.advance() + time.sleep(0.5) return False if not self.back_button.value: self.back() + time.sleep(0.5) return False while time.monotonic() < (start_time + frame_object.duration / 1000): pass