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