Compare commits
2 commits
aa6ef89745
...
3e6687ea34
Author | SHA1 | Date | |
---|---|---|---|
3e6687ea34 | |||
7a1c6894da |
1 changed files with 18 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue