eric6/MicroPython/MicroPythonDevices.py

changeset 8092
c0d72dbba8bb
parent 8084
7742e0b96629
child 8096
5425a9072300
equal deleted inserted replaced
8091:c000526a6d0d 8092:c0d72dbba8bb
189 availablePorts = QSerialPortInfo.availablePorts() 189 availablePorts = QSerialPortInfo.availablePorts()
190 for port in availablePorts: 190 for port in availablePorts:
191 supported = False 191 supported = False
192 vid = port.vendorIdentifier() 192 vid = port.vendorIdentifier()
193 pid = port.productIdentifier() 193 pid = port.productIdentifier()
194
195 if vid == 0 and pid == 0:
196 # no device detected at port
197 continue
198
194 for board in SupportedBoards: 199 for board in SupportedBoards:
195 if ((vid, pid) in SupportedBoards[board]["ids"] or 200 if ((vid, pid) in SupportedBoards[board]["ids"] or
196 (vid, None) in SupportedBoards[board]["ids"]): 201 (vid, None) in SupportedBoards[board]["ids"]):
197 if board in ("bbc_microbit", "calliope"): 202 if board in ("bbc_microbit", "calliope"):
198 # both boards have the same VID and PID 203 # both boards have the same VID and PID

eric ide

mercurial