keep LPC in boot mode to give a chance to ask for a transfer
authoredouard
Tue, 01 Feb 2011 11:05:07 +0100
changeset 567 72b51ec5be64
parent 566 657900299557
child 568 20a223828a06
keep LPC in boot mode to give a chance to ask for a transfer
connectors/LPC/LPCBootObject.py
connectors/LPC/LPCBootProto.py
--- a/connectors/LPC/LPCBootObject.py	Wed Nov 17 08:30:35 2010 +0100
+++ b/connectors/LPC/LPCBootObject.py	Tue Feb 01 11:05:07 2011 +0100
@@ -34,6 +34,7 @@
         self.SerialConnection = LPCBootProto(comport,#number
                                          115200, #speed
                                          120)      #timeout
+        self.HandleSerialTransaction(KEEPBOOTINGTransaction())
         self.PLCStatus = "Stopped"
     
     def NewPLC(self, md5sum, data, extrafiles):
--- a/connectors/LPC/LPCBootProto.py	Wed Nov 17 08:30:35 2010 +0100
+++ b/connectors/LPC/LPCBootProto.py	Tue Feb 01 11:05:07 2011 +0100
@@ -28,6 +28,11 @@
     def ExchangeData(self): 
         pass
 
+class KEEPBOOTINGTransaction(LPCBootTransaction):
+    def __init__(self):
+        LPCBootTransaction.__init__(self, "md5\n")
+    ExchangeData = LPCBootTransaction.SendData
+
 class LOADTransaction(LPCBootTransaction):
     def __init__(self, data):
         LPCBootTransaction.__init__(self, data)