247 def __activateBootloader(self): |
247 def __activateBootloader(self): |
248 """ |
248 """ |
249 Private slot to switch the board into 'bootloader' mode. |
249 Private slot to switch the board into 'bootloader' mode. |
250 """ |
250 """ |
251 if self.microPython.isConnected(): |
251 if self.microPython.isConnected(): |
252 self.microPython.deviceInterface().execute( |
252 self.executeCommands( |
253 "import machine\nmachine.bootloader()\n", mode=self._submitMode |
253 "import machine\nmachine.bootloader()\n", mode=self._submitMode |
254 ) |
254 ) |
255 # simulate pressing the disconnect button |
255 # simulate pressing the disconnect button |
256 self.microPython.on_connectButton_clicked() |
256 self.microPython.on_connectButton_clicked() |
257 |
257 |
332 @pyqtSlot() |
332 @pyqtSlot() |
333 def __resetDevice(self): |
333 def __resetDevice(self): |
334 """ |
334 """ |
335 Private slot to reset the connected device. |
335 Private slot to reset the connected device. |
336 """ |
336 """ |
337 self.microPython.deviceInterface().execute( |
337 if self.microPython.isConnected(): |
338 "import machine\nmachine.reset()\n", mode=self._submitMode |
338 self.executeCommands( |
339 ) |
339 "import machine\nmachine.reset()\n", mode=self._submitMode |
340 # simulate pressing the disconnect button |
340 ) |
341 self.microPython.on_connectButton_clicked() |
341 # simulate pressing the disconnect button |
|
342 self.microPython.on_connectButton_clicked() |
342 |
343 |
343 def getDocumentationUrl(self): |
344 def getDocumentationUrl(self): |
344 """ |
345 """ |
345 Public method to get the device documentation URL. |
346 Public method to get the device documentation URL. |
346 |
347 |