Changed the MicroPython super menu to always present the 'Flash UF2 Device' menu entry because some devices don't have a valid serial port when in UF2 'bootloader' mode. eric7

Mon, 27 Feb 2023 16:20:08 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Feb 2023 16:20:08 +0100
branch
eric7
changeset 9812
cf625a86a861
parent 9807
a87b1479b107
child 9813
4b1096f1a5ee

Changed the MicroPython super menu to always present the 'Flash UF2 Device' menu entry because some devices don't have a valid serial port when in UF2 'bootloader' mode.

src/eric7/MicroPython/MicroPythonWidget.py file | annotate | diff | comparison | revisions
--- a/src/eric7/MicroPython/MicroPythonWidget.py	Mon Feb 27 11:18:32 2023 +0100
+++ b/src/eric7/MicroPython/MicroPythonWidget.py	Mon Feb 27 16:20:08 2023 +0100
@@ -1492,9 +1492,8 @@
                 self.tr("Show Documentation"), self.__showDocumentation
             ).setEnabled(self.__device.hasDocumentationUrl())
             self.__superMenu.addSeparator()
-        if bool(UF2FlashDialog.getFoundDevices()):
-            self.__superMenu.addAction(self.tr("Flash UF2 Device"), self.__flashUF2)
-            self.__superMenu.addSeparator()
+        self.__superMenu.addAction(self.tr("Flash UF2 Device"), self.__flashUF2)
+        self.__superMenu.addSeparator()
         self.__superMenu.addAction(
             self.tr("Manage Unknown Devices"), self.__manageUnknownDevices
         )

eric ide

mercurial