Files
dragonpilot/panda/board/jungle/flash.py
T
dragonpilot 957d61c2f7 dragonpilot beta3
date: 2023-08-15T11:39:41
commit: 23c1c08d626baec60d22077c16ac8d279730af5c
2023-08-15 11:39:44 +08:00

18 lines
451 B
Python
Executable File

#!/usr/bin/env python3
import os
import subprocess
from panda import PandaJungle
board_path = os.path.dirname(os.path.realpath(__file__))
if __name__ == "__main__":
subprocess.check_call(f"scons -C {board_path}/.. -u -j$(nproc) {board_path}", shell=True)
serials = PandaJungle.list()
print(f"found {len(serials)} panda jungle(s) - {serials}")
for s in serials:
print("flashing", s)
with PandaJungle(serial=s) as p:
p.flash()