Skip to content
Snippets Groups Projects
Commit 580aac62 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

No commit message

No commit message
parent b8da0846
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,8 @@ for i in range(len(label_list)): ...@@ -45,7 +45,8 @@ for i in range(len(label_list)):
cmd = "python $UPE/peripherals/util_unb_sens.py --unb {unbnr} --fn 0:3 --bn 0:3 -n 0".format(unbnr=unbnr) cmd = "python $UPE/peripherals/util_unb_sens.py --unb {unbnr} --fn 0:3 --bn 0:3 -n 0".format(unbnr=unbnr)
# First time datarate reading doesn't return anything # First time datarate reading doesn't return anything
datarate.get_data_rates() datarate.get_data_rates()
startTime = time.time() startTime_sleep = time.time()
startTime_process = time.time()
while True: while True:
output = getstatusoutput(cmd)[1] # Get statusoutput output = getstatusoutput(cmd)[1] # Get statusoutput
linelist = [] linelist = []
...@@ -95,14 +96,14 @@ while True: ...@@ -95,14 +96,14 @@ while True:
# get data rates # get data rates
process_time = time.time() - startTime process_time = time.time() - startTime_process
data_dict.update(calc_datarates_Gbps(process_time)) data_dict.update(calc_datarates_Gbps(process_time))
startTime_process = time.time()
process_time = time.time() - startTime sleep_time = time.time() - startTime_sleep
startTime = time.time() if sleep_time < 1:
if process_time < 2: time.sleep(1-sleep_time)
time.sleep(2-process_time) startTime_sleep = time.time()
# Write data_dict to client # Write data_dict to client
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment