eric6/MicroPython/EspDevices.py

branch
micropython
changeset 7077
3b7475b7a1ef
parent 7065
e3d04faced34
child 7091
84d2a73b448a
--- a/eric6/MicroPython/EspDevices.py	Sat Jul 20 14:48:09 2019 +0200
+++ b/eric6/MicroPython/EspDevices.py	Sun Jul 21 19:54:15 2019 +0200
@@ -127,7 +127,6 @@
         pythonScript = script.split("\n")
         self.sendCommands(pythonScript)
     
-    # TODO: not yet implemented
     def canStartFileManager(self):
         """
         Public method to determine, if a File Manager can be started.
@@ -136,9 +135,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.
@@ -146,7 +150,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