]> sigrok.org Git - sigrok-meter.git/commitdiff
Remove sleeps and timeouts.
authorJens Steinhauser <redacted>
Tue, 18 Nov 2014 14:54:23 +0000 (15:54 +0100)
committerJens Steinhauser <redacted>
Tue, 18 Nov 2014 15:11:41 +0000 (16:11 +0100)
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.

sigrok-meter

index f9ea82b868a7d19e2d95ba0eb2d69dd10b0aef46..ce7dbf36a7d6ab276a17487ac5725103e4b6f7b2 100755 (executable)
@@ -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.'''