projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debug on the spit method in the communication file
[goodfet]
/
client
/
GoodFETMCPCANCommunication.py
diff --git
a/client/GoodFETMCPCANCommunication.py
b/client/GoodFETMCPCANCommunication.py
index
75d9662
..
f91958e
100644
(file)
--- a/
client/GoodFETMCPCANCommunication.py
+++ b/
client/GoodFETMCPCANCommunication.py
@@
-393,10
+393,14
@@
class GoodFETMCPCANCommunication:
self.client.MCPsetrate(freq);
self.client.MCPreqstatNormal();
self.client.MCPsetrate(freq);
self.client.MCPreqstatNormal();
- def spit(self,freq, standardid, repeat, duration = None, debug = False, packet = None):
+ def spitSingle(self,freq, standardid, repeat, duration = None, debug = False, packet = None):
self.spitSetup(freq);
self.spitSetup(freq);
-
+ spit(self,freq, standardid, repeat, duration = None, debug = False, packet = None)
+
+ def spit(self,freq, standardid, repeat, duration = None, debug = False, packet = None):
+
+
#### split SID into different regs
SIDlow = (standardid[0] & 0x07) << 5; # get SID bits 2:0, rotate them to bits 7:5
SIDhigh = (standardid[0] >> 3) & 0xFF; # get SID bits 10:3, rotate them to bits 7:0
#### split SID into different regs
SIDlow = (standardid[0] & 0x07) << 5; # get SID bits 2:0, rotate them to bits 7:5
SIDhigh = (standardid[0] >> 3) & 0xFF; # get SID bits 10:3, rotate them to bits 7:0
@@
-448,10
+452,11
@@
class GoodFETMCPCANCommunication:
starttime = time.time();
while((time.time()-starttime < duration)):
self.client.MCPrts(TXB0=True);
starttime = time.time();
while((time.time()-starttime < duration)):
self.client.MCPrts(TXB0=True);
+ print "MSG printed"
else:
while(1):
self.client.MCPrts(TXB0=True);
else:
while(1):
self.client.MCPrts(TXB0=True);
-
+ print "messages injected"
# MORE DEBUGGING
if(debug):
checkcount = 0;
# MORE DEBUGGING
if(debug):
checkcount = 0;
@@
-627,7
+632,7
@@
if __name__ == "__main__":
# transmission (travis thinks this is because we're sniffing in listen-only
# and thus not generating an ack bit on the recieving board)
if(args.verb=="spit"):
# transmission (travis thinks this is because we're sniffing in listen-only
# and thus not generating an ack bit on the recieving board)
if(args.verb=="spit"):
- comm.spit(freq=freq, standardid=standardid,duration=duration, repeat=repeat, debug=debug)
+ comm.spit
Single
(freq=freq, standardid=standardid,duration=duration, repeat=repeat, debug=debug)