From 4d6d07e94bceaf8c77cbe1adfb9a1b1afd5280bb Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Wed, 16 Jun 2021 09:18:38 -0400 Subject: do not replot if we have no new data --- eitControl.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'eitControl.py') 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: -- cgit v1.2.3