Added check for animations readyness before updating state.

This commit is contained in:
CiscoTheWolf 2023-06-05 22:11:15 +02:00
parent d14f75058d
commit 82d0725cfa
2 changed files with 6 additions and 2 deletions

View file

@ -81,6 +81,9 @@ class StateSingleton:
def update(self):
if not self.get_animations_ready():
print("animation not yet ready")
return
self.update_step()
print("at step: " + str(self.transition_count) + " from default in expression: " + str(self.desired_expression))
self.draw_face()

View file

@ -116,8 +116,9 @@ def interrupt_timer():
proot_state = StateSingleton()
while True:
proot_state.update()
time.sleep(0.01)
if proot_state.get_animations_ready():
proot_state.update()
time.sleep(0.01)
def random_blinks():