changes to get the threading working for sniff in mainDisplay. removed bugs
[goodfet] / client / GoodFETMCPCANCommunication.py
index a907372..3350aa8 100644 (file)
@@ -157,7 +157,7 @@ class GoodFETMCPCANCommunication:
             #add the data to list if the pointer was included
             if(data != None):
                 #data.append(self.client.packet2parsedstr(packet))
-                data.put(self.client.packet2parsedstr(packet))
+                data.put(self.client.packet2parsed(packet))
             if(debug == True):
                 #check packet status
                 MCPstatusReg = self.client.MCPrxstatus();
@@ -181,19 +181,19 @@ class GoodFETMCPCANCommunication:
                 if( verbose==True):
                     #if we want to print a parsed message
                     if( parsed == True):
-#                        packetParsed = self.client.packet2parsed(packet)
-#                        sId = packetParsed.get('sID')
-#                        msg = "sID: %04d" %sId
-#                        if( packetParsed.get('eID')):
-#                            msg += " eID: %d" %packetParsed.get('eID')
-#                        msg += " rtr: %d"%packetParsed['rtr']
-#                        length = packetParsed['length']
-#                        msg += " length: %d"%length
-#                        msg += " data:"
-#                        for i in range(0,length):
-#                            dbidx = 'db%d'%i
-#                            msg +=" %03d"% ord(packetParsed[dbidx])
-                        msg = self.client.packet2parsedstr(packet)
+                        packetParsed = self.client.packet2parsed(packet)
+                        sId = packetParsed.get('sID')
+                        msg = "sID: %04d" %sId
+                        if( packetParsed.get('eID')):
+                            msg += " eID: %d" %packetParsed.get('eID')
+                        msg += " rtr: %d"%packetParsed['rtr']
+                        length = packetParsed['length']
+                        msg += " length: %d"%length
+                        msg += " data:"
+                        for i in range(0,length):
+                            dbidx = 'db%d'%i
+                            msg +=" %03d"% ord(packetParsed[dbidx])
+                        #msg = self.client.packet2parsedstr(packet)
                         print msg
                     # if we want to print just the message as it is read off the chip
                     else: