From ae3457f477920c7f36f4ec40eacbfc3bf08757dc Mon Sep 17 00:00:00 2001 From: George Hotz Date: Sat, 10 Mar 2018 09:28:53 -0800 Subject: [PATCH] usbflash is reliable --- board/pedal/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/pedal/Makefile b/board/pedal/Makefile index b1a7e5861f17dc..c922be54b500b6 100644 --- a/board/pedal/Makefile +++ b/board/pedal/Makefile @@ -20,7 +20,8 @@ CFLAGS += "-DALLOW_DEBUG" usbflash: obj/$(PROJ_NAME).bin ../../tests/pedal/enter_canloader.py - PYTHONPATH=../../ python -c "from python import Panda; p = Panda(); assert(p.bootstub); p.flash('obj/$(PROJ_NAME).bin', reconnect=False)" + sleep 0.5 + PYTHONPATH=../../ python -c "from python import Panda; p = [x for x in [Panda(x) for x in Panda.list()] if x.bootstub]; assert(len(p)==1); p[0].flash('obj/$(PROJ_NAME).bin', reconnect=False)" recover: obj/bootstub.bin obj/$(PROJ_NAME).bin $(DFU_UTIL) -d 0483:df11 -a 0 -s 0x08004000 -D obj/$(PROJ_NAME).bin