|
@@ -8,7 +8,7 @@ import os
|
|
|
|
|
|
import eel # GUI
|
|
import eel # GUI
|
|
|
|
|
|
-#from ADUCv2p1 import * # TO DO
|
|
|
|
|
|
+from ADUCv2p1 import *
|
|
|
|
|
|
###################################
|
|
###################################
|
|
## PYTHON UTILITIES
|
|
## PYTHON UTILITIES
|
|
@@ -438,15 +438,18 @@ import re
|
|
chips = []
|
|
chips = []
|
|
adresses = []
|
|
adresses = []
|
|
# TO DO
|
|
# TO DO
|
|
-'''
|
|
|
|
p = subprocess.Popen(['i2cdetect', '-y','1'],stdout=subprocess.PIPE,)
|
|
p = subprocess.Popen(['i2cdetect', '-y','1'],stdout=subprocess.PIPE,)
|
|
-for i in range(0,9):
|
|
|
|
- line = str(p.stdout.readline())[2:]
|
|
|
|
|
|
+p.stdout.readline()
|
|
|
|
+for i in range(0,8):
|
|
|
|
+ line = str(p.stdout.readline())[4:]
|
|
|
|
+ print(line)
|
|
for match in re.finditer("[0-9a-f]+", line):
|
|
for match in re.finditer("[0-9a-f]+", line):
|
|
- adresses.append(int(match, 16))
|
|
|
|
- chips.append(ADUCv2p1(int(match, 16),True))
|
|
|
|
|
|
+ print(match)
|
|
|
|
+ adresses.append(int(match.group(0), 16))
|
|
|
|
+ chips.append(ADUCv2p1(int(match.group(0), 16),True))
|
|
|
|
+print('Found boards', chips)
|
|
update_state()
|
|
update_state()
|
|
-'''
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -458,7 +461,7 @@ while(True):
|
|
# save_waveform() # TO DO
|
|
# save_waveform() # TO DO
|
|
eel.sleep(1/state["pi_freq"])
|
|
eel.sleep(1/state["pi_freq"])
|
|
if(i%100==0):
|
|
if(i%100==0):
|
|
- clean_old_files("/data/waveforms", 1000)
|
|
|
|
|
|
+ clean_old_files("data/waveforms", 1000)
|
|
i += 1
|
|
i += 1
|
|
|
|
|
|
|
|
|