fix openpilot board flashing

This commit is contained in:
George Hotz 2017-07-12 02:54:20 -07:00
parent 27a8af1107
commit 8ff93ad5da
1 changed files with 3 additions and 6 deletions

View File

@ -11,12 +11,9 @@ def enter_download_mode(device):
try:
handle.controlWrite(usb1.TYPE_VENDOR | usb1.RECIPIENT_DEVICE, 0xd1, 0, 0, b'')
except usb1.USBErrorIO as e:
print("Device download mode enabled.")
time.sleep(1)
else:
print("Device failed to enter download mode.")
sys.exit(1)
except Exception:
pass
time.sleep(1)
def find_first_panda(context=None):
context = context or usb1.USBContext()