diff --git a/.hgignore b/.hgignore index 4bb729e..daf4e13 100644 --- a/.hgignore +++ b/.hgignore @@ -17,3 +17,7 @@ glob:cur glob:tmp glob:__pycache__ glob:**.DS_Store +syntax: glob +test/* +deb/* +dist/* diff --git a/revpimodio2.e4p b/revpimodio2.e4p index 7e42f71..e71ed34 100644 --- a/revpimodio2.e4p +++ b/revpimodio2.e4p @@ -1,7 +1,7 @@ - + en_US @@ -22,6 +22,9 @@ revpimodio2/__init__.py revpimodio2/device.py revpimodio2/helper.py + test/test_dio_while2.py + test/test_dio_mainloop.py + test/test_dio_cycleloop.py diff --git a/revpimodio2/io.py b/revpimodio2/io.py index 6fd37c1..3bfcc45 100644 --- a/revpimodio2/io.py +++ b/revpimodio2/io.py @@ -529,7 +529,7 @@ class IOBase(object): return -1 # WaitExit Event säubern - self._parentdevice._parent._waitexit.clear() + self._parentdevice._modio._waitexit.clear() val_start = self.value timeout = timeout / 1000 @@ -538,12 +538,12 @@ class IOBase(object): exitevent = Event() flt_timecount = 0 if bool_timecount else -1 - while not self._parentdevice._parent._waitexit.is_set() \ + while not self._parentdevice._modio._waitexit.is_set() \ and not exitevent.is_set() \ and flt_timecount < timeout: - if self._parentdevice._parent.imgwriter.newdata.wait(2.5): - self._parentdevice._parent.imgwriter.newdata.clear() + if self._parentdevice._modio._imgwriter.newdata.wait(2.5): + self._parentdevice._modio._imgwriter.newdata.clear() if val_start != self.value: if edge == BOTH \ @@ -554,7 +554,7 @@ class IOBase(object): val_start = not val_start if bool_timecount: flt_timecount += \ - self._parentdevice._parent.imgwriter._refresh + self._parentdevice._modio._imgwriter._refresh elif bool_timecount: # TODO: Prüfen flt_timecount += 1 @@ -564,7 +564,7 @@ class IOBase(object): return 1 # RevPiModIO mainloop wurde verlassen - if self._parentdevice._parent._waitexit.is_set(): + if self._parentdevice._modio._waitexit.is_set(): return 100 # Timeout abgelaufen diff --git a/revpimodio2/modio.py b/revpimodio2/modio.py index 2f38419..32fa755 100644 --- a/revpimodio2/modio.py +++ b/revpimodio2/modio.py @@ -197,7 +197,7 @@ class RevPiModIO(object): delattr(self.device, errdev) warnings.warn( "equal device name in pictory configuration. can not " - "build device to acces by name. you can access all devices " + "build device to access by name. you can access all devices " "by position number .device[nn] only!", Warning ) @@ -378,6 +378,7 @@ class RevPiModIO(object): dev._selfupdate = False if not self._monitoring: self.writeprocimg(True, dev) + self._looprunning = False def get_jconfigrsc(self): """Laed die piCotry Konfiguration und erstellt ein dict().