src/eric7/MicroPython/Devices/PyBoardDevices.py

branch
mpy_network
changeset 9989
286c2a21f36f
parent 9927
fa258d559f01
child 10069
435cc5875135
equal deleted inserted replaced
9988:1ba9d07ba9da 9989:286c2a21f36f
498 def __activateBootloader(self): 498 def __activateBootloader(self):
499 """ 499 """
500 Private slot to activate the bootloader and disconnect. 500 Private slot to activate the bootloader and disconnect.
501 """ 501 """
502 if self.microPython.isConnected(): 502 if self.microPython.isConnected():
503 self.microPython.deviceInterface().execute( 503 self.executeCommands(
504 [ 504 [
505 "import pyb", 505 "import pyb",
506 "pyb.bootloader()", 506 "pyb.bootloader()",
507 ], 507 ],
508 mode=self._submitMode, 508 mode=self._submitMode,
513 @pyqtSlot() 513 @pyqtSlot()
514 def __resetDevice(self): 514 def __resetDevice(self):
515 """ 515 """
516 Private slot to reset the connected device. 516 Private slot to reset the connected device.
517 """ 517 """
518 self.microPython.deviceInterface().execute( 518 if self.microPython.isConnected():
519 "import machine\nmachine.reset()\n", mode=self._submitMode 519 self.executeCommands(
520 ) 520 "import machine\nmachine.reset()\n", mode=self._submitMode
521 )
521 522
522 ################################################################## 523 ##################################################################
523 ## time related methods below 524 ## time related methods below
524 ################################################################## 525 ##################################################################
525 526

eric ide

mercurial