CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name. micropython

Wed, 07 Aug 2019 16:08:46 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 07 Aug 2019 16:08:46 +0200
branch
micropython
changeset 7125
2028553ee58c
parent 7124
1965daf1a14b
child 7126
376deb7fefe7

CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.

eric6/MicroPython/CircuitPythonDevices.py file | annotate | diff | comparison | revisions
eric6/MicroPython/EspDevices.py file | annotate | diff | comparison | revisions
eric6/MicroPython/MicroPythonDevices.py file | annotate | diff | comparison | revisions
--- a/eric6/MicroPython/CircuitPythonDevices.py	Tue Aug 06 17:45:59 2019 +0200
+++ b/eric6/MicroPython/CircuitPythonDevices.py	Wed Aug 07 16:08:46 2019 +0200
@@ -59,6 +59,15 @@
         """
         return False
     
+    def deviceName(self):
+        """
+        Public method to get the name of the device.
+        
+        @return name of the device
+        @rtype str
+        """
+        return self.tr("CircuitPython")
+    
     def canStartRepl(self):
         """
         Public method to determine, if a REPL can be started.
--- a/eric6/MicroPython/EspDevices.py	Tue Aug 06 17:45:59 2019 +0200
+++ b/eric6/MicroPython/EspDevices.py	Wed Aug 07 16:08:46 2019 +0200
@@ -56,6 +56,15 @@
         """
         return True
     
+    def deviceName(self):
+        """
+        Public method to get the name of the device.
+        
+        @return name of the device
+        @rtype str
+        """
+        return self.tr("ESP8266, ESP32")
+    
     def canStartRepl(self):
         """
         Public method to determine, if a REPL can be started.
--- a/eric6/MicroPython/MicroPythonDevices.py	Tue Aug 06 17:45:59 2019 +0200
+++ b/eric6/MicroPython/MicroPythonDevices.py	Wed Aug 07 16:08:46 2019 +0200
@@ -185,6 +185,15 @@
         """
         return True
     
+    def deviceName(self):
+        """
+        Public method to get the name of the device.
+        
+        @return name of the device
+        @rtype str
+        """
+        return self.tr("Unsupported Device")
+    
     def canStartRepl(self):
         """
         Public method to determine, if a REPL can be started.

eric ide

mercurial