SVGHMI: few fixes on serving svghmi
authorEdouard Tisserant
Thu, 12 Sep 2019 12:54:36 +0200
branchsvghmi
changeset 2772 3f1dd8312710
parent 2771 361366b891ca
child 2773 6e5e752372c8
SVGHMI: few fixes on serving
svghmi/svghmi.py
svghmi/svghmi_server.py
--- a/svghmi/svghmi.py	Wed Sep 11 12:24:30 2019 +0200
+++ b/svghmi/svghmi.py	Thu Sep 12 12:54:36 2019 +0200
@@ -355,6 +355,8 @@
 
         target_file.close()
 
+        res += ((target_fname, open(target_path, "rb")),)
+
         runtimefile_path = os.path.join(buildpath, "runtime_svghmi1_%s.py" % location_str)
         runtimefile = open(runtimefile_path, 'w')
         runtimefile.write("""
--- a/svghmi/svghmi_server.py	Wed Sep 11 12:24:30 2019 +0200
+++ b/svghmi/svghmi_server.py	Thu Sep 12 12:54:36 2019 +0200
@@ -31,7 +31,7 @@
         global svghmi_sessions
         svghmi_sessions.remove(self)
 
-    def onMessage():
+    def onMessage(self, msg):
         # TODO :  pass it to the C side recieve_message()
         #    update HMITree
         #        - values
@@ -87,4 +87,4 @@
 # Called by PLCObject at stop
 def _runtime_svghmi0_stop():
     global svghmi_listener
-    svghmi_listener.stopListening
+    svghmi_listener.stopListening()