mirror of https://github.com/commaai/panda.git
fix openpilot board flashing
This commit is contained in:
parent
27a8af1107
commit
8ff93ad5da
|
@ -11,12 +11,9 @@ def enter_download_mode(device):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
handle.controlWrite(usb1.TYPE_VENDOR | usb1.RECIPIENT_DEVICE, 0xd1, 0, 0, b'')
|
handle.controlWrite(usb1.TYPE_VENDOR | usb1.RECIPIENT_DEVICE, 0xd1, 0, 0, b'')
|
||||||
except usb1.USBErrorIO as e:
|
except Exception:
|
||||||
print("Device download mode enabled.")
|
pass
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
else:
|
|
||||||
print("Device failed to enter download mode.")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def find_first_panda(context=None):
|
def find_first_panda(context=None):
|
||||||
context = context or usb1.USBContext()
|
context = context or usb1.USBContext()
|
||||||
|
|
Loading…
Reference in New Issue