MicroPythonDevices: added an optimisation when scanning for devices.

Wed, 10 Feb 2021 15:43:30 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 10 Feb 2021 15:43:30 +0100
changeset 8092
c0d72dbba8bb
parent 8091
c000526a6d0d
child 8093
436e4de91f12

MicroPythonDevices: added an optimisation when scanning for devices.

eric6/MicroPython/MicroPythonDevices.py file | annotate | diff | comparison | revisions
--- a/eric6/MicroPython/MicroPythonDevices.py	Wed Feb 10 15:42:56 2021 +0100
+++ b/eric6/MicroPython/MicroPythonDevices.py	Wed Feb 10 15:43:30 2021 +0100
@@ -191,6 +191,11 @@
         supported = False
         vid = port.vendorIdentifier()
         pid = port.productIdentifier()
+        
+        if vid == 0 and pid == 0:
+            # no device detected at port
+            continue
+        
         for board in SupportedBoards:
             if ((vid, pid) in SupportedBoards[board]["ids"] or
                     (vid, None) in SupportedBoards[board]["ids"]):

eric ide

mercurial