mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 15:13:52 +01:00
RevPiSlaveDev SD deutlich schneller - meldet nur bei sysflush schreibstatus
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
[DEFAULT]
|
||||
autoreload=1
|
||||
autostart=1
|
||||
plcworkdir=/var/lib/revpipyload
|
||||
plcprogram=program.py
|
||||
autoreload = 1
|
||||
autostart = 1
|
||||
plcworkdir = /var/lib/revpipyload
|
||||
plcprogram = program.py
|
||||
plcarguments=
|
||||
plcuid=1000
|
||||
plcgid=1000
|
||||
plcslave=0
|
||||
plcslaveacl=
|
||||
plcuid = 1000
|
||||
plcgid = 1000
|
||||
plcslave = 0
|
||||
plcslaveacl =
|
||||
plcslaveport = 55234
|
||||
pythonversion=3
|
||||
xmlrpc=0
|
||||
pythonversion = 3
|
||||
xmlrpc = 0
|
||||
xmlrpcacl =
|
||||
xmlrpcport=55123
|
||||
zeroonerror=0
|
||||
zeroonexit=0
|
||||
xmlrpcport = 55123
|
||||
zeroonerror = 0
|
||||
zeroonexit = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
|
||||
<!-- eric project file for project revpipyload -->
|
||||
<!-- Saved: 2017-07-21, 22:24:05 -->
|
||||
<!-- Saved: 2017-08-26, 09:25:46 -->
|
||||
<!-- Copyright (C) 2017 Sven Sager, akira@narux.de -->
|
||||
<Project version="5.1">
|
||||
<Language>en_US</Language>
|
||||
@@ -12,7 +12,7 @@
|
||||
<Version>0.5.0</Version>
|
||||
<Author>Sven Sager</Author>
|
||||
<Email>akira@narux.de</Email>
|
||||
<Eol index="-1"/>
|
||||
<Eol index="1"/>
|
||||
<Sources>
|
||||
<Source>revpipyload/proginit.py</Source>
|
||||
<Source>setup.py</Source>
|
||||
|
||||
@@ -597,6 +597,7 @@ class RevPiSlaveDev(Thread):
|
||||
self._deadtime = None
|
||||
self._devcon, self._addr = devcon
|
||||
self._evt_exit = Event()
|
||||
self._writeerror = False
|
||||
|
||||
# Sicherheitsbytes
|
||||
self.ey_dict = {}
|
||||
@@ -660,6 +661,7 @@ class RevPiSlaveDev(Thread):
|
||||
block = self._devcon.recv(length)
|
||||
except:
|
||||
proginit.logger.error("error while recv data to write")
|
||||
self._writeerror = True
|
||||
break
|
||||
fh_proc.seek(position)
|
||||
|
||||
@@ -671,7 +673,12 @@ class RevPiSlaveDev(Thread):
|
||||
break
|
||||
|
||||
# Record seperator character
|
||||
self._devcon.send(b'\x1e')
|
||||
if control == b'\x1c':
|
||||
if self._writeerror:
|
||||
self._devcon.send(b'\xff')
|
||||
else:
|
||||
self._devcon.send(b'\x1e')
|
||||
self._writeerror = False
|
||||
|
||||
elif cmd == b'\x06\x16':
|
||||
# Just sync
|
||||
@@ -749,6 +756,7 @@ class RevPiSlaveDev(Thread):
|
||||
while True:
|
||||
data = fh_pic.read(1024)
|
||||
if data:
|
||||
# FIXME: Fehler fangen
|
||||
self._devcon.send(data)
|
||||
else:
|
||||
fh_pic.close()
|
||||
|
||||
Reference in New Issue
Block a user