X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETNRF.py;h=70a0cb1aa2502771709ece66d534b055ff1ff2c0;hp=3b3a4986ed13e64d72e200167bc0260d90999f37;hb=f15cabc15a42fb1b0b57e433dc3a1f300cff2b6c;hpb=c7b364e67182697c0205c2318c0a07af23ed8e2b diff --git a/client/GoodFETNRF.py b/client/GoodFETNRF.py index 3b3a498..70a0cb1 100644 --- a/client/GoodFETNRF.py +++ b/client/GoodFETNRF.py @@ -5,7 +5,7 @@ # # This code is being rewritten and refactored. You've been warned! -import sys, time, string, cStringIO, struct, glob, serial, os; +import sys, time, string, cStringIO, struct, glob, os; from GoodFET import GoodFET; @@ -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: - 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): @@ -86,7 +88,7 @@ class GoodFETNRF(GoodFET): return "GFSK"; def RF_getrate(self): rate=self.peek(0x06)&0x28; - if rate==0x28: + if rate==0x20: rate=250*10**3; #256kbps elif rate==0x08: rate=2*10**6; #2Mbps