aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-16 09:18:38 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-16 09:18:38 -0400
commit4d6d07e94bceaf8c77cbe1adfb9a1b1afd5280bb (patch)
tree9da67ede99ef2edfcdb9b06672d18255ca71635c
parent3ccb238caa6f7ae690fba601a846d603cfc50d56 (diff)
downloadpyExpControl-4d6d07e94bceaf8c77cbe1adfb9a1b1afd5280bb.tar.gz
pyExpControl-4d6d07e94bceaf8c77cbe1adfb9a1b1afd5280bb.zip
do not replot if we have no new data
-rw-r--r--eitControl.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/eitControl.py b/eitControl.py
index 73f83a4..d0e1c2e 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -270,6 +270,7 @@ class Experiment:
self.dataPlot.setLabel('bottom', 'Frequency offset', units='Hz')
self.dataPlot.setLabel('left', 'Signal', units='V')
+ self.data['newData'] = True
stop = datetime.now()
runTime = (stop-start).seconds + float((stop-start).microseconds)/1000000
# print("onTic DAQ took %s seconds." % (runTime) )
@@ -278,6 +279,11 @@ class Experiment:
self.dataPlot.autoRange()
def updatePlot(self,swp=None):
+ if 'newData' in self.data and self.data['newData']:
+ self.data['newData'] = False
+ else:
+ return
+
start = datetime.now()
x = self.data['x']
for name in self.channelsNames2plot: