mirror of
https://github.com/commaai/panda.git
synced 2026-06-08 13:17:17 +08:00
fix openpilot board flashing
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user