ProjectController.py
changeset 3421 70ef15fca028
parent 3396 8c8cb5c9ff38
child 3476 46a7aac382ef
--- a/ProjectController.py	Thu Jan 20 11:39:05 2022 +0100
+++ b/ProjectController.py	Mon Jan 24 11:14:56 2022 +0100
@@ -796,7 +796,7 @@
         # Compute offset before ST resulting of transformation from user POUs
         self.ProgramOffset = IECCodeContent.count("\n")
 
-        IECCodeContent += open(self._getIECgeneratedcodepath(), "r").read()
+        POUsIECCodeContent = open(self._getIECgeneratedcodepath(), "r").read()
 
         IECcodepath = self._getIECcodepath()
 
@@ -805,9 +805,11 @@
 
         with open(IECcodepath, "w") as plc_file:
             plc_file.write(IECCodeContent)
+            plc_file.write(POUsIECCodeContent)
 
         hasher = hashlib.md5()
         hasher.update(IECCodeContent)
+        hasher.update(POUsIECCodeContent)
         self.IECcodeDigest = hasher.hexdigest()
 
         return True