aboutsummaryrefslogtreecommitdiff
path: root/eitControl.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-17 17:53:22 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-17 17:53:22 -0400
commit34aa435652c7535fba438d791c4a7413a3a537f7 (patch)
treeb5675e3bd23609664cd4bcaaad0e18d58493bce7 /eitControl.py
parentf69d022552ed65a5f0e3548d864d1a68b1d22927 (diff)
downloadpyExpControl-34aa435652c7535fba438d791c4a7413a3a537f7.tar.gz
pyExpControl-34aa435652c7535fba438d791c4a7413a3a537f7.zip
data ready flag moved away from the data array.
Having non array variable in dictionary of array to save broke csv import
Diffstat (limited to 'eitControl.py')
-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