1
0
mirror of https://github.com/naruxde/revpipycontrol.git synced 2025-11-08 15:43:52 +01:00

Bugfix: RevPiLogfile ignoriert bei Dienstneustart xml exception

Bugfix: RevPiOption ignorierte Abbrechen-Schaltfl?che beim speichern
Bugfix: WindowHandling bei gesicherten Fenstern
Bugfix: Optionsspeicherung und neustart RevPiCheckclient
Designanpassungen
locale in setup ?bernommen
This commit is contained in:
2017-07-02 11:36:17 +02:00
parent 145468d35b
commit 15b59be6d8
13 changed files with 272 additions and 203 deletions

41
doc/index.html Normal file
View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html><head>
<title>Table of contents</title>
<meta charset="UTF-8">
</head>
<body style="background-color:#FFFFFF;color:#000000">
<h1 style="background-color:#FFFFFF;color:#0000FF">
Table of contents</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Modules</h3>
<table>
<tr>
<td><a style="color:#0000FF" href="mytools.html">mytools</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpicheckclient.html">revpicheckclient</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpiinfo.html">revpiinfo</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpilogfile.html">revpilogfile</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpioption.html">revpioption</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpiplclist.html">revpiplclist</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpiprogram.html">revpiprogram</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="revpipycontrol.html">revpipycontrol</a></td>
<td></td>
</tr>
</table>
</body></html>

View File

@@ -35,7 +35,7 @@ tkinter.Frame
<h3 style="background-color:#FFFFFF;color:#FF0000">
Class Attributes</h3>
<table>
<tr><td>app</td></tr><tr><td>cli</td></tr><tr><td>root</td></tr>
<tr><td>None</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Class Methods</h3>

View File

@@ -135,7 +135,12 @@ RevPiOption._setappdata</h3>
<b>_setappdata</b>(<i></i>)
<p>
Speichert ge&#228;nderte Einstellungen auf RevPi.
</p><a NAME="RevPiOption.askxmlon" ID="RevPiOption.askxmlon"></a>
</p><dl>
<dt>Returns:</dt>
<dd>
None
</dd>
</dl><a NAME="RevPiOption.askxmlon" ID="RevPiOption.askxmlon"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption.askxmlon</h3>
<b>askxmlon</b>(<i></i>)

View File

@@ -170,13 +170,16 @@ Generiert Men&#252;eintr&#228;ge.
</p><a NAME="RevPiPyControl._opt_conn" ID="RevPiPyControl._opt_conn"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._opt_conn</h3>
<b>_opt_conn</b>(<i>text</i>)
<b>_opt_conn</b>(<i>text, reconnect=False</i>)
<p>
Stellt eine neue Verbindung zu RevPiPyLoad her.
</p><dl>
<dt><i>text</i></dt>
<dd>
Verbindungsname
</dd><dt><i>reconnect</i></dt>
<dd>
Socket Timeout nicht heruntersetzen
</dd>
</dl><a NAME="RevPiPyControl.infowindow" ID="RevPiPyControl.infowindow"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">

View File

@@ -22,9 +22,6 @@ revpicheckclient.RevPiCheckClient?1(master, xmlcli, xmlmode=0)
revpicheckclient._?8
revpiinfo.RevPiInfo._checkclose?5(event=None)
revpiinfo.RevPiInfo._createwidgets?5(extended=False)
revpiinfo.RevPiInfo.app?7
revpiinfo.RevPiInfo.cli?7
revpiinfo.RevPiInfo.root?7
revpiinfo.RevPiInfo.visitwebsite?4(event=None)
revpiinfo.RevPiInfo?1(master, xmlcli, version)
revpiinfo._?8
@@ -86,7 +83,7 @@ revpipycontrol.RevPiPyControl._closeapp?5(event=None)
revpipycontrol.RevPiPyControl._createwidgets?5()
revpipycontrol.RevPiPyControl._fillconnbar?5()
revpipycontrol.RevPiPyControl._fillmbar?5()
revpipycontrol.RevPiPyControl._opt_conn?5(text)
revpipycontrol.RevPiPyControl._opt_conn?5(text, reconnect=False)
revpipycontrol.RevPiPyControl.infowindow?4()
revpipycontrol.RevPiPyControl.myapp?7
revpipycontrol.RevPiPyControl.plcdebug?4()

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
<!-- eric project file for project revpipycontrol -->
<!-- Saved: 2017-06-30, 13:49:59 -->
<!-- Saved: 2017-07-02, 11:35:49 -->
<!-- Copyright (C) 2017 Sven Sager, akira@narux.de -->
<Project version="5.1">
<Language>en_US</Language>
@@ -227,12 +227,6 @@
<string>setup.py</string>
</list>
</value>
<key>
<string>noindex</string>
</key>
<value>
<bool>True</bool>
</value>
<key>
<string>outputDirectory</string>
</key>

View File

@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: RevPiPyControl 0.4.0\n"
"POT-Creation-Date: 2017-06-30 21:05+0200\n"
"PO-Revision-Date: 2017-06-30 21:05+0200\n"
"POT-Creation-Date: 2017-07-02 11:32+0200\n"
"PO-Revision-Date: 2017-07-02 11:33+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de\n"
@@ -15,17 +15,17 @@ msgstr ""
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: .\n"
#: revpicheckclient.py:103 revpicheckclient.py:395 revpioption.py:288
#: revpiplclist.py:199 revpiprogram.py:306 revpiprogram.py:337
#: revpiprogram.py:401 revpiprogram.py:407 revpiprogram.py:413
#: revpiprogram.py:421 revpiprogram.py:427 revpiprogram.py:460
#: revpiprogram.py:544 revpiprogram.py:616 revpiprogram.py:647
#: revpiprogram.py:660 revpiprogram.py:715 revpiprogram.py:735
#: revpiprogram.py:743 revpipycontrol.py:342
#: revpicheckclient.py:104 revpicheckclient.py:412 revpioption.py:309
#: revpiplclist.py:205 revpiprogram.py:315 revpiprogram.py:346
#: revpiprogram.py:410 revpiprogram.py:416 revpiprogram.py:422
#: revpiprogram.py:430 revpiprogram.py:436 revpiprogram.py:469
#: revpiprogram.py:553 revpiprogram.py:626 revpiprogram.py:657
#: revpiprogram.py:670 revpiprogram.py:725 revpiprogram.py:745
#: revpiprogram.py:753 revpipycontrol.py:359
msgid "Error"
msgstr "Fehler"
#: revpicheckclient.py:104
#: revpicheckclient.py:105
msgid ""
"Given value for Output '{}' is not valid! \n"
"Reset to '{}'"
@@ -33,40 +33,40 @@ msgstr ""
"Angegebener Wert bei Output '{}' ist nicht gültig! \n"
"Setze auf '{}' zurück"
#: revpicheckclient.py:202
#: revpicheckclient.py:204
msgid "Devices of RevPi"
msgstr "Devices vom RevPi"
#: revpicheckclient.py:234
#: revpicheckclient.py:236
msgid "Control"
msgstr "Kontrolle"
#: revpicheckclient.py:238
#: revpicheckclient.py:240
msgid "Read all IOs"
msgstr "IOs aktualisieren"
#: revpicheckclient.py:243
#: revpicheckclient.py:245
msgid "Read just Inputs"
msgstr "Inputs lesen"
#: revpicheckclient.py:248
#: revpicheckclient.py:252
msgid "Write Outputs"
msgstr "Outputs schreiben"
#: revpicheckclient.py:254
#: revpicheckclient.py:258
msgid "Autorefresh values"
msgstr "Aktualisiere automatisch"
#: revpicheckclient.py:262
#: revpicheckclient.py:266
msgid "Write values to RevPi"
msgstr "Schreibe Werte auf RevPi"
#: revpicheckclient.py:276 revpiprogram.py:434 revpipycontrol.py:228
#: revpipycontrol.py:267 revpipycontrol.py:285 revpipycontrol.py:303
#: revpicheckclient.py:280 revpiprogram.py:443 revpipycontrol.py:235
#: revpipycontrol.py:276 revpipycontrol.py:294 revpipycontrol.py:320
msgid "Warning"
msgstr "Warnung"
#: revpicheckclient.py:277
#: revpicheckclient.py:281
msgid ""
"You want to set outputs on the RevPi! Note that these are set "
"IMMEDIATELY!!! \n"
@@ -78,7 +78,7 @@ msgstr ""
"Wenn auf dem RevPi ein anderes Programm zur Steuerung läuft, könnte dies "
"gestört werden und die Ausgänge wieder zurücksetzen."
#: revpicheckclient.py:392
#: revpicheckclient.py:409
msgid "Error set value of device '{}' Output '{}': {} \n"
msgstr "Fehler beim Setzen auf Device '{}' bei Output '{}': {}\n"
@@ -125,36 +125,36 @@ msgstr ""
"\n"
"(c) Sven Sager, Lizenz: LGPLv3"
#: revpiinfo.py:136 revpioption.py:225 revpiplclist.py:133
#: revpiinfo.py:138 revpioption.py:232 revpiplclist.py:134
msgid "Close"
msgstr "Schließen"
#: revpilogfile.py:39
#: revpilogfile.py:41
msgid "RevPi Python PLC Logs"
msgstr "RevPi Python PLC Logdaten"
#: revpilogfile.py:52
#: revpilogfile.py:54
msgid "RevPiPyLoad - Logfile"
msgstr "RevPiPyLoad - Logdatei"
#: revpilogfile.py:56 revpilogfile.py:71
#: revpilogfile.py:58 revpilogfile.py:73
msgid "Clear screen"
msgstr "Leere Ansicht"
#: revpilogfile.py:67
#: revpilogfile.py:69
msgid "Python PLC program - Logfile"
msgstr "Python PLC Programm - Logdatei"
#: revpilogfile.py:147
#: revpilogfile.py:157
msgid "Can not access log file on the RevPi"
msgstr "RevPi kann auf Logdatei nicht zugreifen"
#: revpioption.py:61 revpioption.py:273 revpioption.py:298 revpiplclist.py:62
#: revpiplclist.py:176 revpiprogram.py:370 revpiprogram.py:445
#: revpioption.py:66 revpioption.py:272 revpioption.py:319 revpiplclist.py:63
#: revpiplclist.py:181 revpiprogram.py:379 revpiprogram.py:454
msgid "Question"
msgstr "Frage"
#: revpioption.py:62 revpiplclist.py:63
#: revpioption.py:67 revpiplclist.py:64
msgid ""
"Do you really want to quit? \n"
"Unsaved changes will be lost"
@@ -162,23 +162,23 @@ msgstr ""
"Wollen Sie wirklich beenden? \n"
"Nicht gespeicherte Änderungen gehen verloren"
#: revpioption.py:72
#: revpioption.py:77
msgid "RevPi Python PLC Options"
msgstr "RevPi Python PLC Einstellungen"
#: revpioption.py:80
#: revpioption.py:87
msgid "Start / Stop behavior"
msgstr "Start / Stop Verhalten"
#: revpioption.py:89
#: revpioption.py:96
msgid "Start program automatically"
msgstr "Starte Programm automatisch"
#: revpioption.py:95
#: revpioption.py:102
msgid "Restart program after exit"
msgstr "Starte Programm nach Beenden neu"
#: revpioption.py:103
#: revpioption.py:110
msgid ""
"Set process image to NULL if program\n"
"terminates successfully"
@@ -186,7 +186,7 @@ msgstr ""
"\"Prozessabbild auf NULL setzen, wenn Programm\n"
"\"erfolgreich beendet wird\""
#: revpioption.py:111
#: revpioption.py:118
msgid ""
"Set process image to NULL if program\n"
"terminates with errors"
@@ -194,35 +194,35 @@ msgstr ""
"Prozessabbild auf NULL setzen, wenn Programm\n"
"fehlerhaft beendet wird"
#: revpioption.py:118
#: revpioption.py:125
msgid "PLC program"
msgstr "PLC Programm"
#: revpioption.py:129
#: revpioption.py:136
msgid "Python version"
msgstr "Python Version"
#: revpioption.py:146
#: revpioption.py:153
msgid "Python PLC program name"
msgstr "Python PLC Programmname"
#: revpioption.py:158
#: revpioption.py:165
msgid "Program arguments"
msgstr "Programmargumente"
#: revpioption.py:167
#: revpioption.py:174
msgid "Use RevPi as PLC-Slave"
msgstr "RevPi als PLC-Slave verwenden"
#: revpioption.py:174
#: revpioption.py:181
msgid "XML-RPC server"
msgstr "XML-RPC Server"
#: revpioption.py:186
#: revpioption.py:193
msgid "Activate XML-RPC server on RevPi"
msgstr "Aktiviere XML-RPC Server auf RevPi"
#: revpioption.py:194
#: revpioption.py:201
msgid ""
"Allow download of piCtory configuration and\n"
"PLC programm"
@@ -230,7 +230,7 @@ msgstr ""
"Download von piCtroy Konfiguration und\n"
"PLC Programm zulassen"
#: revpioption.py:201
#: revpioption.py:208
msgid ""
"Allow upload of piCtory configuration and\n"
"PLC programm"
@@ -238,15 +238,23 @@ msgstr ""
"Hochladen von piCtroy Konfiguration und\n"
"PLC Programm zulassen"
#: revpioption.py:206
#: revpioption.py:213
msgid "XML-RPC server port"
msgstr "XML-RPC Serverport"
#: revpioption.py:220 revpiplclist.py:130
#: revpioption.py:227 revpiplclist.py:131
msgid "Save"
msgstr "Speichern"
#: revpioption.py:274
#: revpioption.py:265 revpioption.py:301 revpiplclist.py:197 revpiprogram.py:68
msgid "Information"
msgstr "Information"
#: revpioption.py:266
msgid "You have not made any changes to save."
msgstr "Sie haben keine Änderungen zum Speichern vorgenommen."
#: revpioption.py:273
msgid ""
"The settings are now saved on the Revolution Pi. \n"
"\n"
@@ -258,21 +266,17 @@ msgstr ""
"Sollen die neuen Einstellungen sofort in Kraft treten?\n"
"Dies bedeutet einen Neustart des Dienstes und des laufenden PLC-Programms!"
#: revpioption.py:282 revpiplclist.py:191 revpiprogram.py:65
msgid "Information"
msgstr "Information"
#: revpioption.py:283
#: revpioption.py:302
msgid "Settings saved"
msgstr "Einstellungen gespeichert"
#: revpioption.py:289
#: revpioption.py:310
msgid "The settings could not be saved. This can happen if values are wrong!"
msgstr ""
"Die Einstellungen konnten nicht gesichert werden. Dies kann passieren, wenn "
"Werte falsch sind!"
#: revpioption.py:299
#: revpioption.py:320
msgid ""
"Are you sure you want to deactivate the XML-RPC server? You will NOT be able "
"to access the Revolution Pi with this program."
@@ -280,39 +284,39 @@ msgstr ""
"Soll der XML-RPC Server wirklich beendet werden? Sie können dann NICHT mehr "
"mit diesem Programm auf den Revolution Pi zugreifen."
#: revpiplclist.py:73
#: revpiplclist.py:74
msgid "RevPi Python PLC connections"
msgstr "RevPi Python PLC Verbindungen"
#: revpiplclist.py:93
#: revpiplclist.py:94
msgid "Name"
msgstr "Name"
#: revpiplclist.py:100
#: revpiplclist.py:101
msgid "IP address"
msgstr "IP Adresse"
#: revpiplclist.py:108
#: revpiplclist.py:109
msgid "Port"
msgstr "Port"
#: revpiplclist.py:117
#: revpiplclist.py:118
msgid "New"
msgstr "Neu"
#: revpiplclist.py:120
#: revpiplclist.py:121
msgid "Apply"
msgstr "Übernehmen"
#: revpiplclist.py:124
#: revpiplclist.py:125
msgid "Remove"
msgstr "Entfernen"
#: revpiplclist.py:177
#: revpiplclist.py:182
msgid "Do you really want to delete the selected connection '{}'"
msgstr "Wollen Sie die ausgewählte Verbindung '{}' wirklich löschen?"
#: revpiplclist.py:192
#: revpiplclist.py:198
msgid ""
"Successfully saved. \n"
"Do you want to close this window?"
@@ -320,11 +324,11 @@ msgstr ""
"Verbindungen erfolgreich gespeichert. \n"
"Möchten Sie dieses Fenster jetzt schließen?"
#: revpiplclist.py:200
#: revpiplclist.py:206
msgid "Failed to save connections"
msgstr "Verbindungen konnten nicht gespeichert werden"
#: revpiprogram.py:66
#: revpiprogram.py:69
msgid ""
"A PLC program has been uploaded. Please check the PLC options to see if the "
"correct program is specified as the start program."
@@ -332,135 +336,135 @@ msgstr ""
"Ein PLC Programm wurde hochgeladen. Bitte prüfen Sie die PLC Optionen, ob "
"dort das richtige Programm als Startprogramm angegeben ist."
#: revpiprogram.py:74
#: revpiprogram.py:78
msgid "RevPi Python PLC program"
msgstr "RevPi Python PLC Programm"
#: revpiprogram.py:88
#: revpiprogram.py:92
msgid "PLC python program"
msgstr "PLC Python Programm"
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:108
#: revpiprogram.py:112
#: revpiprogram.py:102 revpiprogram.py:104 revpiprogram.py:112
#: revpiprogram.py:116
msgid "Files"
msgstr "Dateien"
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:492
#: revpiprogram.py:600
#: revpiprogram.py:102 revpiprogram.py:104 revpiprogram.py:501
#: revpiprogram.py:610
msgid "Zip archive"
msgstr "Zip Archiv"
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:505
#: revpiprogram.py:630
#: revpiprogram.py:102 revpiprogram.py:104 revpiprogram.py:514
#: revpiprogram.py:640
msgid "TGZ archive"
msgstr "TGZ Archiv"
#: revpiprogram.py:100
#: revpiprogram.py:104
msgid "Folder"
msgstr "Verzeichnis"
#: revpiprogram.py:117
#: revpiprogram.py:121
msgid "Download PLC program as:"
msgstr "PLC Programm herunterladen als:"
#: revpiprogram.py:127
#: revpiprogram.py:131
msgid "include piCtory configuration"
msgstr "inkl. piCtory Konfiguration"
#: revpiprogram.py:132 revpiprogram.py:176 revpiprogram.py:197
#: revpiprogram.py:136 revpiprogram.py:180 revpiprogram.py:201
msgid "Download"
msgstr "Herunterladen"
#: revpiprogram.py:137
#: revpiprogram.py:141
msgid "Upload PLC program as:"
msgstr "PLC Programm hochladen als:"
#: revpiprogram.py:149
#: revpiprogram.py:153
msgid "clean upload folder before upload"
msgstr "vorher Inhalt im Uploadverzeichnis löschen"
#: revpiprogram.py:156
#: revpiprogram.py:160
msgid "includes piCtory configuration"
msgstr "enthält piCtory Konfiguration"
#: revpiprogram.py:162 revpiprogram.py:184
#: revpiprogram.py:166 revpiprogram.py:188
msgid "Upload"
msgstr "Hochladen"
#: revpiprogram.py:168
#: revpiprogram.py:172
msgid "piCtory configuration"
msgstr "piCtory Konfiguration"
#: revpiprogram.py:172
#: revpiprogram.py:176
msgid "Download piCtory configuration"
msgstr "piCtory Konfiguration herunterladen"
#: revpiprogram.py:179
#: revpiprogram.py:183
msgid "Upload piCtory configuration"
msgstr "piCtory Konfiguration hochladen"
#: revpiprogram.py:190
#: revpiprogram.py:194
msgid "piControl0 prozess image"
msgstr "piControl0 Prozessabbild"
#: revpiprogram.py:193
#: revpiprogram.py:197
msgid "Download process image dump"
msgstr "Prozessabbild Dump herunterladen"
#: revpiprogram.py:203
#: revpiprogram.py:207
msgid "Reset piControl"
msgstr "piControl zurücksetzen"
#: revpiprogram.py:206
#: revpiprogram.py:210
msgid "Execute piControlReset"
msgstr "piControlReset ausführen"
#: revpiprogram.py:210
#: revpiprogram.py:214
msgid "execute"
msgstr "ausführen"
#: revpiprogram.py:216 revpipycontrol.py:107
#: revpiprogram.py:220 revpipycontrol.py:107
msgid "Exit"
msgstr "Beenden"
#: revpiprogram.py:296 revpiprogram.py:327 revpiprogram.py:488
#: revpiprogram.py:501
#: revpiprogram.py:305 revpiprogram.py:336 revpiprogram.py:497
#: revpiprogram.py:510
msgid "Save as..."
msgstr "Speichern unter..."
#: revpiprogram.py:299 revpiprogram.py:362
#: revpiprogram.py:308 revpiprogram.py:371
msgid "piCtory config"
msgstr "piCtory Konfiguration"
#: revpiprogram.py:299 revpiprogram.py:330 revpiprogram.py:362
#: revpiprogram.py:492 revpiprogram.py:505 revpiprogram.py:575
#: revpiprogram.py:600 revpiprogram.py:630
#: revpiprogram.py:308 revpiprogram.py:339 revpiprogram.py:371
#: revpiprogram.py:501 revpiprogram.py:514 revpiprogram.py:585
#: revpiprogram.py:610 revpiprogram.py:640
msgid "All files"
msgstr "Alle Dateien"
#: revpiprogram.py:307 revpiprogram.py:338 revpiprogram.py:545
#: revpiprogram.py:316 revpiprogram.py:347 revpiprogram.py:554
msgid "Could not load and save file!"
msgstr "Datei konnte nicht geladen und gespeichert werden!"
#: revpiprogram.py:312 revpiprogram.py:343 revpiprogram.py:382
#: revpiprogram.py:390 revpiprogram.py:454 revpiprogram.py:550
#: revpiprogram.py:705
#: revpiprogram.py:321 revpiprogram.py:352 revpiprogram.py:391
#: revpiprogram.py:399 revpiprogram.py:463 revpiprogram.py:559
#: revpiprogram.py:715
msgid "Success"
msgstr "Erfolgreich"
#: revpiprogram.py:313 revpiprogram.py:344 revpiprogram.py:551
#: revpiprogram.py:322 revpiprogram.py:353 revpiprogram.py:560
msgid "File successfully loaded and saved."
msgstr "Dateien erfolgreich übertragen und gespeichert."
#: revpiprogram.py:330
#: revpiprogram.py:339
msgid "Imagefiles"
msgstr "Image Dateien"
#: revpiprogram.py:358
#: revpiprogram.py:367
msgid "Open piCtory file..."
msgstr "piCtory Datei öffnen"
#: revpiprogram.py:371
#: revpiprogram.py:380
msgid ""
"Should the piControl driver be reset after uploading the piCtory "
"configuration?"
@@ -468,7 +472,7 @@ msgstr ""
"Soll nach dem Hochladen der piCtory Konfiguration ein Reset am piControl "
"Treiber durchgeführt werden?"
#: revpiprogram.py:383
#: revpiprogram.py:392
msgid ""
"The transfer of the piCtory configuration and the reset of piControl have "
"been successfully executed."
@@ -476,20 +480,20 @@ msgstr ""
"Die Übertragung der piCtory Konfiguration und der Reset von piControl wurden "
"erfolgreich ausgeführt."
#: revpiprogram.py:391
#: revpiprogram.py:400
msgid "The piCtory configuration was successfully transferred."
msgstr ""
"Die Übertragung der piCtory Konfiguration wurde erfolgreich ausgeführt."
#: revpiprogram.py:402
#: revpiprogram.py:411
msgid "Can not process the transferred file."
msgstr "Kann die übertragene Datei nicht verarbeiten."
#: revpiprogram.py:408
#: revpiprogram.py:417
msgid "Can not find main elements in piCtory file."
msgstr "Kann Hauptelemente in datei nicht finden."
#: revpiprogram.py:414
#: revpiprogram.py:423
msgid ""
"Contained devices could not be found on Revolution Pi. The configuration may "
"be from a newer piCtory version!"
@@ -497,17 +501,17 @@ msgstr ""
"Enthaltene Geräte konnten auf dem Revolution Pi nicht gefunden werden. "
"Möglicherweise stammt die Konfiguration von einer neueren piCtory Version."
#: revpiprogram.py:422
#: revpiprogram.py:431
msgid "Could not load RAP catalog on Revolution Pi."
msgstr "Konnte Katalog auf nicht laden."
#: revpiprogram.py:428
#: revpiprogram.py:437
msgid "The piCtory configuration could not be written on the Revolution Pi."
msgstr ""
"Die piCtory Konfiguration konnte auf dem Revolution Pi nicht geschrieben "
"werden."
#: revpiprogram.py:435
#: revpiprogram.py:444
msgid ""
"The piCtroy configuration has been saved successfully. \n"
"An error occurred on piControl reset!"
@@ -515,7 +519,7 @@ msgstr ""
"Die piCtroy Konfiguration wurde erfolgreich gespeichert. \n"
"Beim piControl Reset trat allerdings ein Fehler auf!"
#: revpiprogram.py:446
#: revpiprogram.py:455
msgid ""
"Are you sure to reset piControl? \n"
"The process image and the piBridge are interrupted !!!"
@@ -523,56 +527,56 @@ msgstr ""
"Soll piControlReset wirklich durchgeführt werden? \n"
"Das Prozessabbild und die Steuerung werden dann unterbrochen!!!"
#: revpiprogram.py:455
#: revpiprogram.py:464
msgid "piControlReset executed successfully"
msgstr "piControl Reset war erfolgreich"
#: revpiprogram.py:461
#: revpiprogram.py:470
msgid "piControl reset could not be executed successfully"
msgstr "piControl Reset konnte nicht erfolgreich durchgeführt werden"
#: revpiprogram.py:475
#: revpiprogram.py:484
msgid "Directory to save"
msgstr "Verzeichnis zum Ablegen"
#: revpiprogram.py:585
#: revpiprogram.py:595
msgid "Folder to upload"
msgstr "Verzeichnis zum Hochladen"
#: revpiprogram.py:596
#: revpiprogram.py:606
msgid "Upload Zip archive..."
msgstr "Zip Archiv hochladen..."
#: revpiprogram.py:617
#: revpiprogram.py:627
msgid "The specified file is not a ZIP archive."
msgstr "Die angegebene Datei ist kein ZIP Archiv"
#: revpiprogram.py:626
#: revpiprogram.py:636
msgid "Upload TarGz archiv..."
msgstr "TarGz Archiv hochladen..."
#: revpiprogram.py:648
#: revpiprogram.py:658
msgid "The specified file is not a TAR archive."
msgstr "Die angegebene Datei ist kein TAR Archiv."
#: revpiprogram.py:661
#: revpiprogram.py:671
msgid "There was an error deleting the files on the Revolution Pi."
msgstr ""
"Beim Löschen der Dateien auf dem Revolution Pi ist ein Fehler aufgetreten."
#: revpiprogram.py:706
#: revpiprogram.py:716
msgid "The PLC program was transferred successfully."
msgstr "Das PLC Programm wurde erfolgreich übertragen."
#: revpiprogram.py:716
#: revpiprogram.py:726
msgid "There is no piCtory configuration in this archive."
msgstr "Es wurde keine piCtory Konfiguration im Archiv gefunden."
#: revpiprogram.py:736
#: revpiprogram.py:746
msgid "The Revolution Pi could not process some parts of the transmission."
msgstr "Der Revoluton Pi konnte Teile der Übertragung nicht verarbeiten."
#: revpiprogram.py:744
#: revpiprogram.py:754
msgid "Errors occurred during transmission"
msgstr "Bei der Übertragung traten Fehler auf"
@@ -636,7 +640,7 @@ msgstr "Trennen"
msgid "Connect"
msgstr "Verbinden"
#: revpipycontrol.py:229
#: revpipycontrol.py:236
msgid ""
"The watch mode ist not supported in version {} of RevPiPyLoad on your RevPi! "
"You need at least version 0.4.0."
@@ -644,7 +648,7 @@ msgstr ""
"Der Watch-Modus wird von der RevPiPyLoad Version {} auf dem RevPi nicht "
"unterstützt! Sie benötigen mindestens Version 0.4.0."
#: revpipycontrol.py:268
#: revpipycontrol.py:277
msgid ""
"This version of Logviewer ist not supported in version {} of RevPiPyLoad on "
"your RevPi! You need at least version 0.4.1."
@@ -652,7 +656,7 @@ msgstr ""
"Diese Version vom Logbetrachter wird in der RevPiPyLoad Version {} auf Ihrem "
"RevPi nicht unterstützt! Sie benötigen mindestens Version 0.4.1."
#: revpipycontrol.py:286 revpipycontrol.py:304
#: revpipycontrol.py:295 revpipycontrol.py:321
msgid ""
"XML-RPC access mode in the RevPiPyLoad configuration is to small to access "
"this dialog"
@@ -660,7 +664,7 @@ msgstr ""
"Der XML-RPC Modus ist beim RevPiPyLoad nicht hoch genug eingestellt, um "
"diesen Dialog zu verwenden!"
#: revpipycontrol.py:343
#: revpipycontrol.py:360
msgid "Can not reach server!"
msgstr "Server ist nicht erreichbar!"

View File

@@ -199,10 +199,11 @@ class RevPiCheckClient(tkinter.Frame):
def _createwidgets(self):
"""Erstellt den Fensterinhalt."""
cFxPxy53 = {"fill": "x", "padx": 5, "pady": 3}
devgrp = tkinter.LabelFrame(self)
devgrp["text"] = _("Devices of RevPi")
devgrp.pack(fill="y", side="left")
devgrp.pack(expand=True, fill="both", side="left")
for dev in self.lst_devices:
win = tkinter.Toplevel(self)
@@ -229,29 +230,29 @@ class RevPiCheckClient(tkinter.Frame):
btn = tkinter.Button(devgrp)
btn["command"] = lambda win=win: self.__showwin(win)
btn["text"] = self.dict_devices[dev]
btn.pack(fill="x", padx=10, pady=5)
btn.pack(**cFxPxy53)
# Steuerungsfunktionen
cntgrp = tkinter.LabelFrame(self)
cntgrp["text"] = _("Control")
cntgrp.pack(fill="y", side="right")
cntgrp.pack(expand=True, fill="both", side="right")
self.btn_refresh = tkinter.Button(cntgrp)
self.btn_refresh["text"] = _("Read all IOs")
self.btn_refresh["command"] = self.refreshvalues
self.btn_refresh.pack(fill="x")
self.btn_refresh.pack(**cFxPxy53)
self.btn_read = tkinter.Button(cntgrp)
self.btn_read["text"] = _("Read just Inputs")
self.btn_read["command"] = self.readvalues
self.btn_read.pack(fill="x")
self.btn_read.pack(**cFxPxy53)
self.btn_write = tkinter.Button(cntgrp)
self.btn_write["state"] = "normal" if self.xmlmode >= 3 \
else "disabled"
self.btn_write["text"] = _("Write Outputs")
self.btn_write["command"] = self.writevalues
self.btn_write.pack(fill="x")
self.btn_write.pack(**cFxPxy53)
self.chk_auto = tkinter.Checkbutton(cntgrp)
self.chk_auto["command"] = self.toggleauto
@@ -361,11 +362,11 @@ class RevPiCheckClient(tkinter.Frame):
if not self.autorw.get():
try:
self.chk_auto["state"] = "normal"
self._workvalues()
except:
pass
return None
self._workvalues()
self.master.after(200, self.tmr_workvalues)
def toggleauto(self):

View File

@@ -141,12 +141,3 @@ class RevPiInfo(tkinter.Frame):
def visitwebsite(self, event=None):
u"""Öffnet auf dem System einen Webbrowser zur Projektseite."""
webbrowser.open("https://revpimodio.org")
# TODO: Remove testdrive
if __name__ == "__main__":
from xmlrpc.client import ServerProxy
cli = ServerProxy("http://192.168.50.35:55123")
root = tkinter.Tk()
app = RevPiInfo(root, cli, "0.4.0")
app.mainloop()

View File

@@ -23,6 +23,8 @@ class RevPiLogfile(tkinter.Frame):
# Systemvariablen
self.loadblock = 16384
self.errapp = 0
self.errplc = 0
self.mrkapp = 0
self.mrkplc = 0
@@ -94,9 +96,13 @@ class RevPiLogfile(tkinter.Frame):
@param full Ganzes Logbuch laden"""
# Logs abrufen und letzte Position merken
try:
self.mrkapp = self._load_log(
self.applog, self.xmlcli.load_applog, self.mrkapp, full
)
self.errapp = 0
except:
self.errapp += 1
# Timer neu starten
self.master.after(1000, self.get_applog)
@@ -106,9 +112,13 @@ class RevPiLogfile(tkinter.Frame):
@param full Ganzes Logbuch laden"""
# Logs abrufen und letzte Position merken
try:
self.mrkplc = self._load_log(
self.plclog, self.xmlcli.load_plclog, self.mrkplc, full
)
self.errplc = 0
except:
self.errplc += 1
# Timer neu starten
self.master.after(1000, self.get_plclog)

View File

@@ -33,6 +33,7 @@ class RevPiOption(tkinter.Frame):
self.mrk_var_xmlmod2 = False
self.mrk_var_xmlmod3 = False
self.mrk_xmlmodask = False
self.dorestart = False
# Fenster bauen
self._createwidgets()
@@ -256,7 +257,25 @@ class RevPiOption(tkinter.Frame):
self.var_xmlport.set(self.dc.get("xmlrpcport", "55123"))
def _setappdata(self):
u"""Speichert geänderte Einstellungen auf RevPi."""
u"""Speichert geänderte Einstellungen auf RevPi.
@return None"""
if not self._changesdone():
tkmsg.showinfo(
_("Information"),
_("You have not made any changes to save."),
)
self._checkclose()
return None
ask = tkmsg.askyesnocancel(
_("Question"),
_("The settings are now saved on the Revolution Pi. \n\n"
"Should the new settings take effect immediately? \nThis "
"means a restart of the service and the PLC program!"),
parent=self.master
)
if ask is not None:
self.dc["autostart"] = int(self.var_start.get())
self.dc["autoreload"] = int(self.var_reload.get())
self.dc["zeroonexit"] = int(self.var_zexit.get())
@@ -277,20 +296,13 @@ class RevPiOption(tkinter.Frame):
self.dc["xmlrpcport"] = self.var_xmlport.get()
ask = tkmsg.askyesnocancel(
_("Question"),
_("The settings are now saved on the Revolution Pi. \n\n"
"Should the new settings take effect immediately? \nThis "
"means a restart of the service and the PLC program!"),
parent=self.master
)
if ask is not None:
if self.xmlcli.set_config(self.dc, ask):
tkmsg.showinfo(
_("Information"),
_("Settings saved"),
parent=self.master
)
self.dorestart = ask
self._checkclose()
else:
tkmsg.showerror(

View File

@@ -17,7 +17,6 @@ import socket
import tkinter
import tkinter.messagebox as tkmsg
import webbrowser
from functools import partial
from mytools import addroot, gettrans
from xmlrpc.client import ServerProxy
@@ -120,8 +119,8 @@ class RevPiPyControl(tkinter.Frame):
self.mbar.add_cascade(label=_("Help"), menu=menu1)
self.var_conn = tkinter.StringVar(self)
self.txt_connect = tkinter.Entry(
self, textvariable=self.var_conn, state="readonly", width=30)
self.txt_connect = tkinter.Entry(self, state="readonly", width=40)
self.txt_connect["textvariable"] = self.var_conn
self.txt_connect.pack(fill="x")
self.btn_plcstart = tkinter.Button(self)
@@ -160,7 +159,7 @@ class RevPiPyControl(tkinter.Frame):
self.mconn.delete(0, "end")
for con in sorted(self.dict_conn.keys(), key=lambda x: x.lower()):
self.mconn.add_command(
label=con, command=partial(self._opt_conn, con)
label=con, command=lambda con=con: self._opt_conn(con)
)
def _fillmbar(self):
@@ -183,10 +182,15 @@ class RevPiPyControl(tkinter.Frame):
self.mconn = tkinter.Menu(self.mbar, tearoff=False)
self.mbar.add_cascade(label=_("Connect"), menu=self.mconn)
def _opt_conn(self, text):
def _opt_conn(self, text, reconnect=False):
u"""Stellt eine neue Verbindung zu RevPiPyLoad her.
@param text Verbindungsname"""
@param text Verbindungsname
@param reconnect Socket Timeout nicht heruntersetzen"""
if reconnect:
socket.setdefaulttimeout(15)
else:
socket.setdefaulttimeout(2)
sp = ServerProxy(
"http://{}:{}".format(
self.dict_conn[text][0], int(self.dict_conn[text][1])
@@ -215,9 +219,9 @@ class RevPiPyControl(tkinter.Frame):
def infowindow(self):
u"""Öffnet das Fenster für die Info."""
win = tkinter.Toplevel(self)
revpiinfo.RevPiInfo(win, self.cli, pycontrolversion)
win.focus_set()
win.grab_set()
revpiinfo.RevPiInfo(win, self.cli, pycontrolversion)
self.wait_window(win)
self.dict_conn = revpiplclist.get_connections()
self._fillconnbar()
@@ -250,16 +254,16 @@ class RevPiPyControl(tkinter.Frame):
self.debugframe.dowrite.set(False)
self.debugframe.pack_forget()
else:
self.debugframe.pack(fill="y")
self.debugframe.pack(fill="x")
self.btn_debug["state"] = "normal"
def plclist(self):
u"""Öffnet das Fenster für die Verbindungen."""
win = tkinter.Toplevel(self)
revpiplclist.RevPiPlcList(win)
win.focus_set()
win.grab_set()
revpiplclist.RevPiPlcList(win)
self.wait_window(win)
self.dict_conn = revpiplclist.get_connections()
self._fillconnbar()
@@ -294,13 +298,20 @@ class RevPiPyControl(tkinter.Frame):
)
else:
win = tkinter.Toplevel(self)
self.tkoptions = \
revpioption.RevPiOption(win, self.cli)
win.focus_set()
win.grab_set()
self.tkoptions = \
revpioption.RevPiOption(win, self.cli)
self.wait_window(win)
if self.tkoptions.dc is not None:
self.xmlmode = self.tkoptions.dc["xmlrpc"]
if self.tkoptions.dc is not None and self.tkoptions.dorestart:
# Wenn XML-Modus anders und Dienstneustart
if self.xmlmode != self.tkoptions.dc["xmlrpc"]:
self.serverdisconnect()
self._opt_conn(self.revpiname, True)
if self.debugframe is not None:
self.cli.psstart()
def plcprogram(self):
u"""Startet das Programmfenster."""
@@ -313,10 +324,10 @@ class RevPiPyControl(tkinter.Frame):
)
else:
win = tkinter.Toplevel(self)
self.tkprogram = revpiprogram.RevPiProgram(
win, self.cli, self.xmlmode, self.revpiname)
win.focus_set()
win.grab_set()
self.tkprogram = revpiprogram.RevPiProgram(
win, self.cli, self.xmlmode, self.revpiname)
self.wait_window(win)
def plcstart(self):

View File

@@ -82,7 +82,7 @@ elif platform == "win32":
options={"build_exe": {
"include_files": [
"revpipycontrol/revpipycontrol.png",
# "m4server/locale"
"revpipycontrol/locale"
]
}},
executables=[exe],