Skip to content

Commit 1ae751f

Browse files
Comments and print warning
1 parent 855b0e1 commit 1ae751f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

DvG_dev_Base__pyqt_lib.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
__authoremail__ = "vangils.dennis@gmail.com"
4040
__url__ = "https://github.com/Dennis-van-Gils/DvG_dev_Arduino"
4141
__date__ = "14-09-2018"
42-
__version__ = "1.0.1"
42+
__version__ = "1.0.2"
4343

4444
import queue
4545
import numpy as np
@@ -187,6 +187,9 @@ def attach_device(self, dev):
187187
if type(self.dev) == self.NoAttachedDevice:
188188
self.dev = dev
189189
self.dev.mutex = QtCore.QMutex()
190+
else:
191+
pft("Device can be attached only once. Already attached to '%s'." %
192+
self.dev.name)
190193

191194
# --------------------------------------------------------------------------
192195
# Create workers
@@ -336,9 +339,9 @@ class Worker_DAQ(QtCore.QObject):
336339
every DAQ update. It should return True when everything went
337340
successful, and False otherwise.
338341
339-
NOTE: No changes to the GUI should run inside this function! If
340-
you do anyhow, expect a penalty in the timing stability of this
341-
worker.
342+
NOTE: No direct changes to the GUI should run inside this
343+
function! If you do anyhow, expect a penalty in the timing
344+
stability of this worker.
342345
343346
E.g. pseudo-code, where 'time' and 'reading_1' are variables
344347
that live at a higher scope, presumably at main/GUI scope level.
@@ -493,9 +496,6 @@ class Worker_send(QtCore.QObject):
493496
needed, use the QtCore.pyqtSignal() mechanism to instigate GUI changes.
494497
495498
Args:
496-
dev:
497-
Reference to a 'device' instance with I/O methods.
498-
499499
alt_process_jobs_function (optional, default=None):
500500
Reference to an user-supplied function performing an alternative
501501
job handling when processing the worker_send queue. The default

0 commit comments

Comments
 (0)