Added times
This commit is contained in:
parent
af3cdf78f1
commit
155c1513a1
@ -18,8 +18,6 @@ def update():
|
||||
with globals()['lock']:
|
||||
globals()['data'] = grid_string
|
||||
|
||||
print("data updated to: " + grid_string)
|
||||
|
||||
return grid_string
|
||||
|
||||
def prepare_grid(grid):
|
||||
@ -41,7 +39,10 @@ def serial_func():
|
||||
while True:
|
||||
with globals()['lock']:
|
||||
if globals()['data'] != '':
|
||||
t1 = time.time()
|
||||
ser.write(bytes(globals()['data'], 'ascii'))
|
||||
t2 = time.time()
|
||||
print("time taken: " + str(t2-t1) + "s")
|
||||
globals()['data'] = ''
|
||||
time.sleep(0.1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user