Skip to content

Commit

Permalink
gmlan recv test
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jun 15, 2018
1 parent a1a2d97 commit 9ab6a56
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/gmbitbang/recv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python
import time
from panda import Panda

p = Panda()
p.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
p.set_gmlan(bus=2)
#p.can_send(0xaaa, "\x00\x00", bus=3)
last_add = None
while 1:
ret = p.can_recv()
if len(ret) > 0:
add = ret[0][0]
if last_add is not None and add != last_add+1:
print "MISS %d %d" % (last_add, add)
last_add = add
print ret

0 comments on commit 9ab6a56

Please sign in to comment.