mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 23:23:52 +01:00
Mit jessie zusammenführen
This commit is contained in:
@@ -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-04-11, 12:21:18 -->
|
||||
<!-- Saved: 2017-05-31, 15:02:13 -->
|
||||
<!-- Copyright (C) 2017 Sven Sager, akira@narux.de -->
|
||||
<Project version="5.1">
|
||||
<Language>en_US</Language>
|
||||
@@ -9,7 +9,7 @@
|
||||
<ProgLanguage mixed="0">Python3</ProgLanguage>
|
||||
<ProjectType>Console</ProjectType>
|
||||
<Description>Dieser Loader wird über das Init-System geladen und führt das angegebene Pythonprogramm aus. Es ist für den RevolutionPi gedacht um automatisch das SPS-Programm zu starten.</Description>
|
||||
<Version>0.2.12</Version>
|
||||
<Version>0.3.0</Version>
|
||||
<Author>Sven Sager</Author>
|
||||
<Email>akira@narux.de</Email>
|
||||
<Eol index="-1"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<Other>MANIFEST.in</Other>
|
||||
<Other>doc</Other>
|
||||
<Other>debian</Other>
|
||||
<Other>revpipyload.api</Other>
|
||||
<Other>eric-revpipyload.api</Other>
|
||||
</Others>
|
||||
<Vcs>
|
||||
<VcsType>Mercurial</VcsType>
|
||||
@@ -176,7 +176,7 @@
|
||||
<string>outputFile</string>
|
||||
</key>
|
||||
<value>
|
||||
<string>revpipyload.api</string>
|
||||
<string>eric-revpipyload.api</string>
|
||||
</value>
|
||||
<key>
|
||||
<string>useRecursion</string>
|
||||
|
||||
@@ -51,10 +51,10 @@ from time import sleep, asctime
|
||||
from xmlrpc.client import Binary
|
||||
from xmlrpc.server import SimpleXMLRPCServer
|
||||
|
||||
configrsc = "/opt/KUNBUS/config.rsc"
|
||||
configrsc = None
|
||||
picontrolreset = "/opt/KUNBUS/piControlReset"
|
||||
procimg = "/dev/piControl0"
|
||||
pyloadverion = "0.2.12"
|
||||
pyloadverion = "0.3.0"
|
||||
|
||||
|
||||
class LogReader():
|
||||
@@ -483,6 +483,27 @@ class RevPiPyLoad():
|
||||
"""Instantiiert RevPiPyLoad-Klasse."""
|
||||
proginit.configure()
|
||||
|
||||
# Globale Werte anpassen
|
||||
global configrsc
|
||||
global picontrolreset
|
||||
|
||||
# piCtory Konfiguration an bekannten Stellen prüfen
|
||||
lst_rsc = ["/etc/revpi/config.rsc", "/opt/KUNBUS/config.rsc"]
|
||||
for rscfile in lst_rsc:
|
||||
if os.access(rscfile, os.F_OK | os.R_OK):
|
||||
configrsc = rscfile
|
||||
break
|
||||
if configrsc is None:
|
||||
raise RuntimeError(
|
||||
"can not access known pictory configurations at {}"
|
||||
"".format(", ".join(lst_rsc))
|
||||
)
|
||||
|
||||
# piControlReset suchen
|
||||
if not os.access(picontrolreset, os.F_OK | os.X_OK):
|
||||
picontrolreset = "/usr/bin/piTest -x"
|
||||
|
||||
# Klassenattribute
|
||||
self._exit = True
|
||||
self.evt_loadconfig = Event()
|
||||
self.globalconfig = ConfigParser()
|
||||
|
||||
Reference in New Issue
Block a user