eric6/MicroPython/MicroPythonReplWidget.py

branch
micropython
changeset 7126
376deb7fefe7
parent 7123
94948e2aa0a5
child 7127
aa6fc2d252ad
diff -r 2028553ee58c -r 376deb7fefe7 eric6/MicroPython/MicroPythonReplWidget.py
--- a/eric6/MicroPython/MicroPythonReplWidget.py	Wed Aug 07 16:08:46 2019 +0200
+++ b/eric6/MicroPython/MicroPythonReplWidget.py	Wed Aug 07 16:10:12 2019 +0200
@@ -307,6 +307,19 @@
         """
         return self.__interface
     
+    def isMicrobit(self):
+        """
+        Public method to check, if the connected/selected device is a
+        BBC micro:bit.
+        
+        @return flag indicating a micro:bit device
+        rtype bool
+        """
+        if self.__device and "micro:bit" in self.__device.deviceName():
+            return True
+        
+        return False
+    
     @pyqtSlot(int)
     def on_deviceTypeComboBox_activated(self, index):
         """

eric ide

mercurial