improve standalone test
parent
14e5931da9
commit
f415052659
|
@ -1,7 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
from panda.lib.panda import Panda
|
||||
import struct
|
||||
import time
|
||||
from panda.lib.panda import Panda
|
||||
|
||||
if __name__ == "__main__":
|
||||
if os.getenv("WIFI") is not None:
|
||||
|
@ -10,12 +11,15 @@ if __name__ == "__main__":
|
|||
p = Panda()
|
||||
print p.health()
|
||||
|
||||
a = 0
|
||||
while 1:
|
||||
# flood
|
||||
p.can_send(0xaa, "\xaa"*8, 0)
|
||||
p.can_send(0xaa, "\xaa"*8, 1)
|
||||
p.can_send(0xaa, "\xaa"*8, 4)
|
||||
msg = "\xaa"*4 + struct.pack("I", a)
|
||||
p.can_send(0xaa, msg, 0)
|
||||
p.can_send(0xaa, msg, 1)
|
||||
p.can_send(0xaa, msg, 4)
|
||||
time.sleep(0.01)
|
||||
|
||||
print p.can_recv()
|
||||
a += 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue