aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eitControl.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/eitControl.py b/eitControl.py
index 7bf22de..e85b174 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -34,6 +34,7 @@ class Experiment:
self.save_cnt = 0
self.tic = 0
+ self.newDataIsReady = False
self.channelsNames2grab={'tic', 'x','rfFreq','dac0', 'dac1', 'adc0', 'adc1', 'adc2', 'adc3'}
alpha=100
self.channelsColor = { 'adc0': (20,20,20,alpha), 'adc1': (85,170,255,alpha), 'adc2': (255,0,255,alpha), 'adc3': (0,85,255,alpha), 'dac0': 'r', 'dac1': 'g'}
@@ -270,7 +271,7 @@ class Experiment:
self.dataPlot.setLabel('bottom', 'Frequency offset', units='Hz')
self.dataPlot.setLabel('left', 'Signal', units='V')
- self.data['newData'] = True
+ self.newDataIsReady = True
stop = datetime.now()
runTime = (stop-start).seconds + float((stop-start).microseconds)/1000000
# print("onTic DAQ took %s seconds." % (runTime) )
@@ -279,8 +280,8 @@ class Experiment:
self.dataPlot.autoRange()
def updatePlot(self,swp=None):
- if 'newData' in self.data and self.data['newData']:
- self.data['newData'] = False
+ if self.newDataIsReady:
+ self.newDataIsReady = False
else:
return