connectors/LPC/LPCAppObject.py
changeset 548 1428fd553988
parent 545 627e5c636a4f
child 557 b155ada1c14a
--- a/connectors/LPC/LPCAppObject.py	Thu Jun 03 17:21:40 2010 +0200
+++ b/connectors/LPC/LPCAppObject.py	Thu Jun 03 17:23:11 2010 +0200
@@ -38,7 +38,7 @@
             try:
                 self.PLCStatus, res = self.SerialConnection.HandleTransaction(transaction)
                 return res
-            except LPCError,e:
+            except LPCProtoError,e:
                 self.pluginsroot.logger.write_error(str(e)+"\n")
                 self.SerialConnection = None
                 self.PLCStatus = "Disconnected"
@@ -52,17 +52,17 @@
         PLCprint("StopPLC")
         self.HandleSerialTransaction(STOPTransaction())
 
-    def GetPLCstatus(self):
+    def ResetPLC(self):
         self.HandleSerialTransaction(RESETTransaction())
         return self.PLCStatus
 
-    def ResetPLC(self):
+    def GetPLCstatus(self):
         self.HandleSerialTransaction(IDLETransaction())
         return self.PLCStatus
 
     def MatchMD5(self, MD5):
         data = self.HandleSerialTransaction(GET_PLCIDTransaction())
-        print "PLCINFO",data[32:]
+        print "PLCINFO",data
         return data[:32] == MD5
 
     class IEC_STRING(ctypes.Structure):