Skip to content

Commit 9ab6a56

Browse files
committed
gmlan recv test
1 parent a1a2d97 commit 9ab6a56

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/gmbitbang/recv.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python
2+
import time
3+
from panda import Panda
4+
5+
p = Panda()
6+
p.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
7+
p.set_gmlan(bus=2)
8+
#p.can_send(0xaaa, "\x00\x00", bus=3)
9+
last_add = None
10+
while 1:
11+
ret = p.can_recv()
12+
if len(ret) > 0:
13+
add = ret[0][0]
14+
if last_add is not None and add != last_add+1:
15+
print "MISS %d %d" % (last_add, add)
16+
last_add = add
17+
print ret

0 commit comments

Comments
 (0)