MicroPython eric7

Sun, 24 Jul 2022 16:41:08 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 24 Jul 2022 16:41:08 +0200
branch
eric7
changeset 9270
2f60384fe01f
parent 9269
6b0311553c70
child 9271
f655c20ff500

MicroPython
- added capability to connect to devices for which only the serial port name is available

docs/changelog file | annotate | diff | comparison | revisions
src/eric7/MicroPython/MicroPythonDevices.py file | annotate | diff | comparison | revisions
--- a/docs/changelog	Sun Jul 24 16:39:24 2022 +0200
+++ b/docs/changelog	Sun Jul 24 16:41:08 2022 +0200
@@ -2,6 +2,9 @@
 ----------
 Version 22.9:
 - bug fixes
+- MicroPython
+  -- added capability to connect to devices for which only the serial port name
+     is available
 
 Version 22.8:
 - bug fixes
--- a/src/eric7/MicroPython/MicroPythonDevices.py	Sun Jul 24 16:39:24 2022 +0200
+++ b/src/eric7/MicroPython/MicroPythonDevices.py	Sun Jul 24 16:41:08 2022 +0200
@@ -360,6 +360,15 @@
                         )
                     unknownPorts.append((vid, pid, desc, port.portName()))
 
+        elif bool(port.portName()):
+            # no VID and/or PID available (e.g. in Linux container of ChromeOS)
+            desc = port.description()
+            if not desc:
+                desc = QCoreApplication.translate(
+                    "MicroPythonDevice", "Unknown Device"
+                )
+            unknownPorts.append((0, 0, desc, port.portName()))
+
     return foundDevices, unknownDevices, unknownPorts
 
 

eric ide

mercurial