eric6/MicroPython/MicroPythonWidget.py

changeset 8038
73ec029d4107
parent 8024
e0eb1d5922a5
child 8051
b78279548993
equal deleted inserted replaced
8037:cf0e5b8cd23a 8038:73ec029d4107
386 return self.__interface 386 return self.__interface
387 387
388 def isMicrobit(self): 388 def isMicrobit(self):
389 """ 389 """
390 Public method to check, if the connected/selected device is a 390 Public method to check, if the connected/selected device is a
391 BBC micro:bit. 391 BBC micro:bit or Calliope mini.
392 392
393 @return flag indicating a micro:bit device 393 @return flag indicating a micro:bit device
394 rtype bool 394 rtype bool
395 """ 395 """
396 if self.__device and "micro:bit" in self.__device.deviceName(): 396 if self.__device and (
397 "micro:bit" in self.__device.deviceName() or
398 "Calliope" in self.__device.deviceName()
399 ):
397 return True 400 return True
398 401
399 return False 402 return False
400 403
401 @pyqtSlot(int) 404 @pyqtSlot(int)
1537 """ 1540 """
1538 if self.__device is None or not self.__device.hasFirmwareUrl(): 1541 if self.__device is None or not self.__device.hasFirmwareUrl():
1539 # abort silently 1542 # abort silently
1540 return 1543 return
1541 1544
1542 url = self.__device.getFirmwareUrl() 1545 self.__device.downloadFirmware()
1543 e5App().getObject("UserInterface").launchHelpViewer(url)
1544 1546
1545 @pyqtSlot() 1547 @pyqtSlot()
1546 def __manageIgnored(self): 1548 def __manageIgnored(self):
1547 """ 1549 """
1548 Private slot to manage the list of ignored serial devices. 1550 Private slot to manage the list of ignored serial devices.

eric ide

mercurial