Empirically reverted calls done just after NewPLC back to the order as it was before chunked transfer. Apparently I broke something... To be continued
authorEdouard Tisserant
Wed, 05 Dec 2018 11:35:18 +0100
changeset 2464 10437c6c294e
parent 2463 8742337a9fe3
child 2465 47d3aea2be30
Empirically reverted calls done just after NewPLC back to the order as it was before chunked transfer. Apparently I broke something... To be continued
ProjectController.py
--- a/ProjectController.py	Tue Dec 04 11:31:58 2018 +0100
+++ b/ProjectController.py	Wed Dec 05 11:35:18 2018 +0100
@@ -1810,6 +1810,8 @@
             return
         # Check remote target PLC correspondance to that md5
         if self._connector.MatchMD5(MD5):
+            self.logger.write(
+                _("Latest build matches with connected target.\n"))
             self.ProgramTransferred()
         else:
             self.logger.write(
@@ -1867,18 +1869,22 @@
         object_path = builder.GetBinaryPath()
         object_blob = self._connector.BlobFromFile(object_path)
 
+        self.HidePLCProgress()
+
+        self.logger.write(_("PLC data transfered successfully.\n"))
+
         if self._connector.NewPLC(MD5, object_blob, extrafiles):
-            self.ProgramTransferred()
-            self.AppFrame.CloseObsoleteDebugTabs()
-            self.AppFrame.LogViewer.ResetLogCounters()
             if self.GetIECProgramsAndVariables():
                 self.UnsubscribeAllDebugIECVariable()
+                self.ProgramTransferred()
+                self.AppFrame.CloseObsoleteDebugTabs()
                 self.AppFrame.RefreshPouInstanceVariablesPanel()
-            self.logger.write(_("Transfer completed successfully.\n"))
+                self.AppFrame.LogViewer.ResetLogCounters()
+                self.logger.write(_("PLC installed successfully.\n"))
+            else:
+                self.logger.write_error(_("Missing debug data\n"))
         else:
-            self.logger.write_error(_("Transfer failed\n"))
-
-        self.HidePLCProgress()
+            self.logger.write_error(_("PLC couldn't be installed\n"))
 
         wx.CallAfter(self.UpdateMethodsFromPLCStatus)