LPC build and protocol tweaks
authoredouard
Thu, 10 Dec 2009 17:36:37 +0100
changeset 503 4c0cd5e54e1b
parent 502 5343ae43f6d0
child 504 688e84df3408
LPC build and protocol tweaks
LPCBeremiz.py
connectors/LPC/LPCProto.py
--- a/LPCBeremiz.py	Thu Dec 10 14:57:27 2009 +0100
+++ b/LPCBeremiz.py	Thu Dec 10 17:36:37 2009 +0100
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+import shutil
 
 __version__ = "$Revision$"
 
@@ -347,8 +348,9 @@
             srcpath = os.path.join(src,i)
             dstpath = os.path.join(dst,i)
             if os.path.isdir(srcpath):
-                if not os.path.exists(dstpath):
-                    os.makedirs(dstpath)
+                if os.path.exists(dstpath):
+                    shutil.rmtree(dstpath)
+                os.makedirs(dstpath)
                 mycopytree(srcpath, dstpath)
             elif os.path.isfile(srcpath):
                 shutil.copy2(srcpath, dstpath)
@@ -419,6 +421,11 @@
             return self.SimulationBuildPath
         else:
             return PluginsRoot._getBuildPath(self)
+
+    def _build(self):
+        if self.BuildPath is not None:
+            mycopytree(self.OrigBuildPath, self.BuildPath)
+        PluginsRoot._build(self)
     
     def SetProjectName(self, name):
         return self.Project.setname(name)
@@ -514,6 +521,7 @@
         self.ProjectPath = ProjectPath
         
         self.BuildPath = self._getBuildPath()
+        self.OrigBuildPath = BuildPath
         if BuildPath is not None:
             mycopytree(BuildPath, self.BuildPath)
         
--- a/connectors/LPC/LPCProto.py	Thu Dec 10 14:57:27 2009 +0100
+++ b/connectors/LPC/LPCProto.py	Thu Dec 10 17:36:37 2009 +0100
@@ -151,7 +151,13 @@
 #           "\x03\x00\x00\x00"*200))
 #    TestConnection.HandleTransaction(STARTTransaction())
     TestConnection.HandleTransaction(SET_TRACE_VARIABLETransaction(
-       "\x05\x00\x00\x00"+
+       "\x01\x00\x00\x00"+
+       "\x04"+
+       "\x01\x02\x02\x04"+
+       "\x01\x00\x00\x00"+
+       "\x08"+
+       "\x01\x02\x02\x04"+
+       "\x01\x02\x02\x04"+
        "\x01\x00\x00\x00"+
        "\x04"+
        "\x01\x02\x02\x04"))