eric6/MicroPython/CircuitPythonDevices.py

changeset 8067
a467ab075be0
parent 8062
8dc5acb30a8b
child 8072
58491f4c99d6
--- a/eric6/MicroPython/CircuitPythonDevices.py	Thu Feb 04 14:35:50 2021 +0100
+++ b/eric6/MicroPython/CircuitPythonDevices.py	Thu Feb 04 14:38:01 2021 +0100
@@ -137,6 +137,7 @@
         @return flag indicated a mounted device
         @rtype bool
         """
+        self.__workspace = ""       # reset before checking
         return self.DeviceVolumeName in self.getWorkspace(silent=True)
     
     def getWorkspace(self, silent=False):
@@ -157,7 +158,7 @@
     
     def __findWorkspace(self, silent=False):
         """
-        Public method to find the workspace directory.
+        Private method to find the workspace directory.
         
         @param silent flag indicating silent operations
         @type bool
@@ -167,7 +168,7 @@
         # Attempts to find the paths on the filesystem that represents the
         # plugged in CIRCUITPY boards.
         deviceDirectories = Utilities.findVolume(self.DeviceVolumeName,
-                                                 all=True)
+                                                 findAll=True)
         
         if deviceDirectories:
             if len(deviceDirectories) == 1:
@@ -181,11 +182,12 @@
                 E5MessageBox.warning(
                     self.microPython,
                     self.tr("Workspace Directory"),
-                    self.tr("Python files for CircuitPython devices are stored"
-                            " on the device. Therefore, to edit these files"
-                            " you need to have the device plugged in. Until"
-                            " you plug in a device, the standard directory"
-                            " will be used."))
+                    self.tr("Python files for CircuitPython can be edited in"
+                            " place, if the device volume is locally"
+                            " available. Such a volume was not found. In"
+                            " place editing will not be available."
+                            )
+                )
             
             return super(CircuitPythonDevice, self).getWorkspace()
     
@@ -265,15 +267,6 @@
         @rtype str
         """
         return Preferences.getMicroPython("CircuitPythonDocuUrl")
-##    
-##    def getFirmwareUrl(self):
-##        """
-##        Public method to get the device firmware download URL.
-##        
-##        @return firmware download URL of the device
-##        @rtype str
-##        """
-##        return Preferences.getMicroPython("CircuitPythonFirmwareUrl")
     
     def getDownloadMenuEntries(self):
         """

eric ide

mercurial