panda/tests/standalone_test.py

22 lines
379 B
Python
Raw Normal View History

2017-04-18 08:34:56 -06:00
#!/usr/bin/env python
import os
from panda.lib.panda import Panda
2017-04-27 12:32:14 -06:00
import time
2017-04-18 08:34:56 -06:00
if __name__ == "__main__":
if os.getenv("WIFI") is not None:
p = Panda("WIFI")
else:
p = Panda()
print p.health()
2017-04-27 12:32:14 -06:00
while 1:
# flood
p.can_send(0xaa, "\xaa"*8, 0)
p.can_send(0xaa, "\xaa"*8, 1)
p.can_send(0xaa, "\xaa"*8, 4)
time.sleep(0.01)
print p.can_recv()