changes to rtr sweep method
authorchrishoder <chrishoder@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 4 Feb 2013 02:37:42 +0000 (02:37 +0000)
committerchrishoder <chrishoder@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 4 Feb 2013 02:37:42 +0000 (02:37 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1446 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETMCPCANCommunication.py

index 169e02a..9c9c489 100644 (file)
@@ -476,9 +476,11 @@ class GoodFETMCPCANCommunication:
             self.client.txpacket(packet)
             ## listen for 2 packets. one should be the rtr we requested the other should be
             ## a new packet response
             self.client.txpacket(packet)
             ## listen for 2 packets. one should be the rtr we requested the other should be
             ## a new packet response
-            starttime = time.tim()
+            starttime = time.time()
             while ((time.time() - starttime) < duration):
                 packet = self.client.rxpacket()
             while ((time.time() - starttime) < duration):
                 packet = self.client.rxpacket()
+                if( packet == None):
+                    continue
                 row = []
                 row.append("%f"%time.time()) #timestamp
                 row.append(0) #error flag (not checkign)
                 row = []
                 row.append("%f"%time.time()) #timestamp
                 row.append(0) #error flag (not checkign)