eric6/MicroPython/UF2FlashDialog.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8243
cc717c2ae956
equal deleted inserted replaced
8221:0572a215bd2f 8222:5994b80b8760
464 if vid == 0 and pid == 0: 464 if vid == 0 and pid == 0:
465 # no device detected at port 465 # no device detected at port
466 continue 466 continue
467 467
468 for board in SupportedUF2Boards: 468 for board in SupportedUF2Boards:
469 if not boardType or (board.startswith(boardType)): 469 if (
470 if (vid, pid) in SupportedUF2Boards[board]["volumes"]: 470 (not boardType or (board.startswith(boardType))) and
471 foundDevices.append(( 471 (vid, pid) in SupportedUF2Boards[board]["volumes"]
472 board, 472 ):
473 port.description(), 473 foundDevices.append((
474 (vid, pid), 474 board,
475 )) 475 port.description(),
476 (vid, pid),
477 ))
476 478
477 # second run for boards needing special treatment (e.g. RP2040) 479 # second run for boards needing special treatment (e.g. RP2040)
478 for board in SupportedUF2Boards: 480 for board in SupportedUF2Boards:
479 if not boardType or (board == boardType): 481 if not boardType or (board == boardType):
480 try: 482 try:

eric ide

mercurial