Compare commits

...

2 commits

View file

@ -6,6 +6,7 @@ import numpy as np
import math
from scipy.optimize import linear_sum_assignment
import threading
import random
print("start configuring matrix")
@ -213,12 +214,27 @@ def update_screen():
def interrupt_timer():
while True:
update_screen()
time.sleep(0.05)
time.sleep(0.01)
# Create and start the interrupt thread
def random_blinks():
while True:
time.sleep(random.randint(5, 10))
proot_state = ProotState()
if proot_state.get_blinks_frames_ready():
proot_state.blink()
# Create and start screen update interrupts
screen_update_thread = threading.Thread(target=interrupt_timer)
screen_update_thread.start()
# Create and start random blinks interrupts
screen_update_thread = threading.Thread(target=random_blinks)
screen_update_thread.start()
print("start setting ProotScreen")
startT = curr_time = round(time.time()*1000)