src/eric7/MicroPython/Devices/MicrobitDevices.py

branch
mpy_network
changeset 9803
2ab3de60b51c
parent 9799
a79430a8811d
child 9820
67597e003373
diff -r 22aeee2bf35f -r 2ab3de60b51c src/eric7/MicroPython/Devices/MicrobitDevices.py
--- a/src/eric7/MicroPython/Devices/MicrobitDevices.py	Sat Feb 25 19:47:23 2023 +0100
+++ b/src/eric7/MicroPython/Devices/MicrobitDevices.py	Sun Feb 26 12:44:03 2023 +0100
@@ -54,6 +54,21 @@
 
         self.__createMicrobitMenu()
 
+    def setConnected(self, connected):
+        """
+        Public method to set the connection state.
+
+        Note: This method can be overwritten to perform actions upon connect
+        or disconnect of the device.
+
+        @param connected connection state
+        @type bool
+        """
+        super().setConnected(connected)
+
+        if self.hasCircuitPython():
+            self.submitMode = "paste"
+
     def setButtons(self):
         """
         Public method to enable the supported action buttons.
@@ -363,7 +378,7 @@
         Private slot to show the firmware version of the connected device and the
         available firmware version.
         """
-        if self.microPython.isConnected() and self.checkDeviceData():
+        if self.microPython.isConnected() and self.checkDeviceData(quiet=False):
             if self._deviceData["mpy_name"] not in ("micropython", "circuitpython"):
                 EricMessageBox.critical(
                     None,

eric ide

mercurial