Removed some unecessary delays and reformatted a bit of the GFNRF code.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 29 Aug 2011 12:47:51 +0000 (12:47 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 29 Aug 2011 12:47:51 +0000 (12:47 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1043 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py
client/GoodFETNRF.py

index 999ac95..1caad81 100755 (executable)
@@ -84,8 +84,9 @@ class GoodFETbtser:
     def write(self,msg):
         """Send traffic."""
         import time;
     def write(self,msg):
         """Send traffic."""
         import time;
-        time.sleep(0.1);
-        return self.sock.send(msg);
+        self.sock.send(msg);
+        #time.sleep(0.1);
+        return;
     def read(self,length):
         """Read traffic."""
         data="";
     def read(self,length):
         """Read traffic."""
         data="";
index 093fc4b..70a0cb1 100644 (file)
@@ -65,9 +65,11 @@ class GoodFETNRF(GoodFET):
             data=data+[(val>>(8*i))&0xFF];
         self.writecmd(self.NRFAPP,0x03,len(data),data);
         if self.peek(reg,bytes)!=val and reg!=0x07:
             data=data+[(val>>(8*i))&0xFF];
         self.writecmd(self.NRFAPP,0x03,len(data),data);
         if self.peek(reg,bytes)!=val and reg!=0x07:
-            print "Warning, failed to set r%02x=%02x, got %02x." %(reg,
-                                                                 val,
-                                                                 self.peek(reg,bytes));
+            print "Warning, failed to set r%02x=%02x, got %02x." %(
+                reg,
+                val,
+                self.peek(reg,bytes));
+        
         return;
     
     def status(self):
         return;
     
     def status(self):