more bug fixing.
This commit is contained in:
parent
39022dc18c
commit
810e6f71d2
2 changed files with 29 additions and 24 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import time
|
||||
import random
|
||||
from PIL import Image
|
||||
|
||||
class ProotState:
|
||||
|
|
@ -82,28 +80,13 @@ class ProotState:
|
|||
matrix.SwapOnVSync(self.frame_canvas_prootScreen_3)
|
||||
|
||||
|
||||
def update_screen(blinkFrameCanvases, matrix):
|
||||
def update_screen(blinkFrameCanvases, matrix):
|
||||
|
||||
proot_state = ProotState()
|
||||
|
||||
if proot_state.get_blinks_frames_ready():
|
||||
# TODO move blinking animation writing logic to the ProotState class
|
||||
matrix.SwapOnVSync(blinkFrameCanvases[proot_state.next_blink_frame_number()])
|
||||
else:
|
||||
proot_state.set_ProotScreen(matrix)
|
||||
|
||||
|
||||
def interrupt_timer(blinkFrameCanvases, matrix):
|
||||
while True:
|
||||
update_screen(blinkFrameCanvases, matrix)
|
||||
time.sleep(0.01)
|
||||
|
||||
|
||||
def random_blinks():
|
||||
while True:
|
||||
time.sleep(random.randint(3, 5))
|
||||
|
||||
proot_state = ProotState()
|
||||
|
||||
if proot_state.get_blinks_frames_ready():
|
||||
proot_state.blink()
|
||||
# TODO move blinking animation writing logic to the ProotState class
|
||||
matrix.SwapOnVSync(blinkFrameCanvases[proot_state.next_blink_frame_number()])
|
||||
else:
|
||||
proot_state.set_ProotScreen(matrix)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue