From f279b102c6e5e5191d545a6b58541f3946218539 Mon Sep 17 00:00:00 2001 From: Adam Haile Date: Sun, 11 Aug 2019 12:18:10 -0400 Subject: [PATCH] Fixing #1142 --- bibliopixel/VERSION | 2 +- bibliopixel/animation/animation.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bibliopixel/VERSION b/bibliopixel/VERSION index 9fe5eb8d2..f0a591643 100644 --- a/bibliopixel/VERSION +++ b/bibliopixel/VERSION @@ -1 +1 @@ -3.4.44 +3.4.45 diff --git a/bibliopixel/animation/animation.py b/bibliopixel/animation/animation.py index 50c8cf91f..0c5a9b2cd 100644 --- a/bibliopixel/animation/animation.py +++ b/bibliopixel/animation/animation.py @@ -65,6 +65,7 @@ def __init__(self, layout, *, preclear=True, fail_on_exception=None, **kwds): self.preclear = preclear self.runner = None self.time = time.time + self.sleep_time = 0 self.preframe_callbacks = [] self.fail_on_exception = self.FAIL_ON_EXCEPTION if fail_on_exception is None else fail_on_exception @@ -178,7 +179,11 @@ def _run_one_frame(self): self.state = runner.STATE.running if self.top_level: - self.threading.wait(self.sleep_time / self.subframes, timestamps) + sleep_time = self.sleep_time + if hasattr(self, 'current_animation'): # for running Sequence + sleep_time = self.current_animation.sleep_time + + self.threading.wait(sleep_time / self.subframes, timestamps) if self.threading.stop_event.isSet(): self.state = runner.STATE.canceled