mirror of
https://github.com/naruxde/revpipycontrol.git
synced 2025-11-08 15:43:52 +01:00
Fixed message on missing piCtory config, add button to open piCtory in browser
This commit is contained in:
5
.idea/revpipycontrol.iml
generated
5
.idea/revpipycontrol.iml
generated
@@ -3,11 +3,10 @@
|
|||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/revpipycontrol" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/revpipycontrol" isTestSource="false" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/downloads" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Python 3.6" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Python 3.6" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TestRunnerService">
|
|
||||||
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
|
|
||||||
</component>
|
|
||||||
</module>
|
</module>
|
||||||
@@ -4,4 +4,3 @@ recursive-include data *
|
|||||||
recursive-include revpipycontrol *
|
recursive-include revpipycontrol *
|
||||||
global-exclude *.pyc
|
global-exclude *.pyc
|
||||||
include LICENSE.txt
|
include LICENSE.txt
|
||||||
|
|
||||||
|
|||||||
5
make.bat
Normal file
5
make.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
pyinstaller --clean -D --windowed ^
|
||||||
|
--add-data="data\revpipycontrol.ico;." ^
|
||||||
|
--icon=data\\revpipycontrol.ico ^
|
||||||
|
revpipycontrol\revpipycontrol.py
|
||||||
@@ -40,6 +40,7 @@ class RevPiPyControl(tkinter.Frame):
|
|||||||
self.cli = None
|
self.cli = None
|
||||||
self.dict_conn = revpiplclist.get_connections()
|
self.dict_conn = revpiplclist.get_connections()
|
||||||
self.errcount = 0
|
self.errcount = 0
|
||||||
|
self.revpiaddress = None
|
||||||
self.revpiname = None
|
self.revpiname = None
|
||||||
self.revpipyversion = [0, 0, 0]
|
self.revpipyversion = [0, 0, 0]
|
||||||
self.xmlfuncs = []
|
self.xmlfuncs = []
|
||||||
@@ -192,6 +193,10 @@ class RevPiPyControl(tkinter.Frame):
|
|||||||
label=_("PLC developer..."), command=self.plcdevelop)
|
label=_("PLC developer..."), command=self.plcdevelop)
|
||||||
self.mplc.add_separator()
|
self.mplc.add_separator()
|
||||||
|
|
||||||
|
self.mplc.add_command(
|
||||||
|
label=_("piCtory configuration"), command=self.plcpictory)
|
||||||
|
self.mplc.add_separator()
|
||||||
|
|
||||||
self.mplc.add_command(
|
self.mplc.add_command(
|
||||||
label=_("Disconnect"), command=self.serverdisconnect)
|
label=_("Disconnect"), command=self.serverdisconnect)
|
||||||
self.mbar.add_cascade(label="PLC", menu=self.mplc, state="disabled")
|
self.mbar.add_cascade(label="PLC", menu=self.mplc, state="disabled")
|
||||||
@@ -219,7 +224,7 @@ class RevPiPyControl(tkinter.Frame):
|
|||||||
self.xmlfuncs = sp.system.listMethods()
|
self.xmlfuncs = sp.system.listMethods()
|
||||||
self.xmlmode = sp.xmlmodus()
|
self.xmlmode = sp.xmlmodus()
|
||||||
self.revpipyversion = list(map(int, sp.version().split(".")))
|
self.revpipyversion = list(map(int, sp.version().split(".")))
|
||||||
except Exception:
|
except Exception as e:
|
||||||
self.servererror()
|
self.servererror()
|
||||||
else:
|
else:
|
||||||
self._closeall()
|
self._closeall()
|
||||||
@@ -229,6 +234,7 @@ class RevPiPyControl(tkinter.Frame):
|
|||||||
self.dict_conn[text][0], int(self.dict_conn[text][1])
|
self.dict_conn[text][0], int(self.dict_conn[text][1])
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self.revpiaddress = self.dict_conn[text][0]
|
||||||
self.revpiname = text
|
self.revpiname = text
|
||||||
self.var_conn.set("{0} - {1}:{2}".format(
|
self.var_conn.set("{0} - {1}:{2}".format(
|
||||||
text, self.dict_conn[text][0], int(self.dict_conn[text][1])
|
text, self.dict_conn[text][0], int(self.dict_conn[text][1])
|
||||||
@@ -253,10 +259,10 @@ class RevPiPyControl(tkinter.Frame):
|
|||||||
if "psstart" not in self.xmlfuncs:
|
if "psstart" not in self.xmlfuncs:
|
||||||
tkmsg.showwarning(
|
tkmsg.showwarning(
|
||||||
_("Warning"),
|
_("Warning"),
|
||||||
_("The watch mode ist not supported in version {0} "
|
_("There is no piCtory configuration on your Revlution Pi! \n\n"
|
||||||
"of RevPiPyLoad on your RevPi! You need at least version "
|
"Create a piCtory configuraiton. \n\nIf you already have, "
|
||||||
"0.5.3! Maybe the python3-revpimodio2 module is not "
|
"make sure RevPiPyload is at least version 0.5.3 and "
|
||||||
"installed on your RevPi at least version 2.0.0."
|
"python3-revpimodio2 is installed at least version 2.5.0."
|
||||||
"").format(self.cli.version()),
|
"").format(self.cli.version()),
|
||||||
parent=self.master
|
parent=self.master
|
||||||
)
|
)
|
||||||
@@ -382,6 +388,10 @@ class RevPiPyControl(tkinter.Frame):
|
|||||||
if self.debugframe is not None:
|
if self.debugframe is not None:
|
||||||
self.cli.psstart()
|
self.cli.psstart()
|
||||||
|
|
||||||
|
def plcpictory(self):
|
||||||
|
u"""Öffnet piCtory Konfiguraiton."""
|
||||||
|
webbrowser.open("http://{0}/".format(self.revpiaddress))
|
||||||
|
|
||||||
def plcprogram(self):
|
def plcprogram(self):
|
||||||
u"""Startet das Programmfenster."""
|
u"""Startet das Programmfenster."""
|
||||||
if self.xmlmode < 2:
|
if self.xmlmode < 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user