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 os
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
|
||||||
|
|
||||||
from panda import Panda, PandaDFU
|
from panda import Panda, PandaDFU
|
||||||
|
|
||||||
board_path = os.path.dirname(os.path.realpath(__file__))
|
board_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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)
|
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 Panda.list():
|
||||||
for s in serials:
|
|
||||||
with Panda(serial=s) as p:
|
with Panda(serial=s) as p:
|
||||||
print(f"putting {p.get_usb_serial()} in DFU mode")
|
print(f"putting {p.get_usb_serial()} in DFU mode")
|
||||||
p.reset(enter_bootstub=True)
|
p.reset(enter_bootstub=True)
|
||||||
|
|
Loading…
Reference in New Issue