From: Jens Steinhauser Date: Tue, 18 Nov 2014 14:54:23 +0000 (+0100) Subject: Remove sleeps and timeouts. X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-meter.git;a=commitdiff_plain;h=082e7d0462e7b435648cd422a65b797c6354096c Remove sleeps and timeouts. Now that we send the whole payload with the signal (instead of generating a signal for each measurement) and only process the most recent value, they aren't necessary any more. --- diff --git a/sigrok-meter b/sigrok-meter index f9ea82b..ce7dbf3 100755 --- a/sigrok-meter +++ b/sigrok-meter @@ -182,10 +182,6 @@ class SamplingThread(QtCore.QObject): if packet.type == sr.PacketType.ANALOG: self.measured.emit(device, packet.payload) - # wait a short time so that in any case we don't flood the GUI - # with new data (for example if the demo device is used) - self.thread().msleep(100) - # signal used to start the worker across threads _start_signal = QtCore.Signal() @@ -212,9 +208,7 @@ class SamplingThread(QtCore.QObject): '''Stops sampling and the background thread.''' self.worker.stop_sampling() self.thread.quit() - # the timeout is needed when the demo device is used, because it - # produces so much outstanding data that quitting takes a long time - self.thread.wait(500) + self.thread.wait() def sr_pkg_version(self): '''Returns the version number of the libsigrok package.'''