Skip to content

Commit

Permalink
Fixing #1142
Browse files Browse the repository at this point in the history
  • Loading branch information
adammhaile committed Aug 11, 2019
1 parent fd97e6c commit f279b10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bibliopixel/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.44
3.4.45
7 changes: 6 additions & 1 deletion bibliopixel/animation/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f279b10

Please sign in to comment.