mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
* fix W391 * E262 * E703 * W293 * some E * E231 * some more E * E225 * more E * E252 * no tabs * more tabs * E701 * uds.py * almost all of them * only e265 left * not sure why this is triggering on commented out code * ignore esptool
23 lines
536 B
Python
Executable File
23 lines
536 B
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import sys
|
|
import random
|
|
|
|
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
|
|
from panda import Panda # noqa: E402
|
|
|
|
def get_test_string():
|
|
return b"test" + os.urandom(10)
|
|
|
|
if __name__ == "__main__":
|
|
p = Panda()
|
|
p.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
|
|
|
|
print("Spamming all buses...")
|
|
while True:
|
|
at = random.randint(1, 2000)
|
|
st = get_test_string()[0:8]
|
|
bus = random.randint(0, 2)
|
|
p.can_send(at, st, bus)
|
|
# print("Sent message on bus: ", bus)
|