mirror of https://github.com/commaai/panda.git
what was that doing there?
This commit is contained in:
parent
cfbc3ff835
commit
5761ab58ea
|
@ -2,21 +2,15 @@
|
|||
import os
|
||||
import time
|
||||
import subprocess
|
||||
import argparse
|
||||
|
||||
from panda import Panda, PandaDFU
|
||||
|
||||
board_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--all", action="store_true", help="Recover all Panda devices")
|
||||
args = parser.parse_args()
|
||||
|
||||
subprocess.check_call(f"scons -C {board_path}/.. -j$(nproc) {board_path}", shell=True)
|
||||
|
||||
serials = Panda.list() if args.all else [None]
|
||||
for s in serials:
|
||||
for s in Panda.list():
|
||||
with Panda(serial=s) as p:
|
||||
print(f"putting {p.get_usb_serial()} in DFU mode")
|
||||
p.reset(enter_bootstub=True)
|
||||
|
|
Loading…
Reference in New Issue