added some comment and increased blink time
This commit is contained in:
parent
a6dcc75897
commit
7a8137e6c2
1 changed files with 4 additions and 1 deletions
|
@ -90,6 +90,7 @@ def generate_face_frames(emote_eye_png, emote_mouth_png, emote_nose_png):
|
|||
|
||||
return face_frames
|
||||
|
||||
# Function that pre-computes all the transition frames
|
||||
def animate():
|
||||
blink_animation_FrameCanvases = []
|
||||
angry_animation_FrameCanvases = []
|
||||
|
@ -115,6 +116,7 @@ animate()
|
|||
|
||||
|
||||
|
||||
# The interupt time is responsible for the (roughly) 100 hz frame rate
|
||||
def interrupt_timer():
|
||||
proot_state = StateSingleton()
|
||||
|
||||
|
@ -124,6 +126,7 @@ def interrupt_timer():
|
|||
time.sleep(0.01)
|
||||
|
||||
|
||||
# Function responsible for the blinking behaviour when Idle
|
||||
def random_blinks():
|
||||
while True:
|
||||
time.sleep(random.randint(3, 5))
|
||||
|
@ -133,7 +136,7 @@ def random_blinks():
|
|||
if proot_state.get_animations_ready():
|
||||
if proot_state.current_expression == proot_state.states[0]:
|
||||
proot_state.set_desired_expression(1)
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.25)
|
||||
proot_state.set_desired_expression(0)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue