mirror of
https://github.com/naruxde/revpimodio2.git
synced 2025-11-08 22:03:53 +01:00
Bugfix in io Module
This commit is contained in:
@@ -17,3 +17,7 @@ glob:cur
|
||||
glob:tmp
|
||||
glob:__pycache__
|
||||
glob:**.DS_Store
|
||||
syntax: glob
|
||||
test/*
|
||||
deb/*
|
||||
dist/*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
|
||||
<!-- eric project file for project revpimodio2 -->
|
||||
<!-- Saved: 2017-08-14, 16:08:00 -->
|
||||
<!-- Saved: 2017-08-15, 08:04:54 -->
|
||||
<!-- Copyright (C) 2017 Sven Sager, akira@narux.de -->
|
||||
<Project version="5.1">
|
||||
<Language>en_US</Language>
|
||||
@@ -22,6 +22,9 @@
|
||||
<Source>revpimodio2/__init__.py</Source>
|
||||
<Source>revpimodio2/device.py</Source>
|
||||
<Source>revpimodio2/helper.py</Source>
|
||||
<Source>test/test_dio_while2.py</Source>
|
||||
<Source>test/test_dio_mainloop.py</Source>
|
||||
<Source>test/test_dio_cycleloop.py</Source>
|
||||
</Sources>
|
||||
<Forms/>
|
||||
<Translations/>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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().
|
||||
|
||||
Reference in New Issue
Block a user