eric6/MicroPython/MicrobitDevices.py

branch
micropython
changeset 7082
ec199ef0cfc6
parent 7065
e3d04faced34
child 7100
c4d9c28ebcd8
--- a/eric6/MicroPython/MicrobitDevices.py	Tue Jul 23 19:43:14 2019 +0200
+++ b/eric6/MicroPython/MicrobitDevices.py	Wed Jul 24 20:12:19 2019 +0200
@@ -104,7 +104,6 @@
         self.__plotterActive = on
         self.microPython.setActionButtons(files=not on)
     
-    # TODO: not yet implemented
     def canStartFileManager(self):
         """
         Public method to determine, if a File Manager can be started.
@@ -113,9 +112,14 @@
             File Manager and a reason why it cannot.
         @rtype tuple of (bool, str)
         """
-        return False, self.tr("File Manager is not supported by this device.")
+        if self.__replActive or self.__plotterActive:
+            return False, self.tr("The file manager and the REPL/plotter use"
+                                  " the same USB serial connection. Only one"
+                                  " can be active at any time. Disconnect the"
+                                  " REPL/plotter and try again.")
+        else:
+            return True, ""
     
-    # TODO: not yet implemented
     def setFileManager(self, on):
         """
         Public method to set the File Manager status and dependent status.
@@ -123,7 +127,9 @@
         @param on flag indicating the active status
         @type bool
         """
-        pass
+        self.__fileManagerActive = on
+        self.microPython.setActionButtons(
+            run=not on, repl=not on, chart=HAS_QTCHART and not on)
     
     @pyqtSlot()
     def handleDataFlood(self):

eric ide

mercurial