eric6/MicroPython/CircuitPythonDevices.py

changeset 7597
9dac5ef0126d
parent 7360
9190402e4505
child 7759
51aa6c6b66f7
equal deleted inserted replaced
7596:1b1f401e1d70 7597:9dac5ef0126d
188 @pyqtSlot() 188 @pyqtSlot()
189 def __flashCircuitPython(self): 189 def __flashCircuitPython(self):
190 """ 190 """
191 Private slot to flash a CircuitPython firmware to the device. 191 Private slot to flash a CircuitPython firmware to the device.
192 """ 192 """
193 ok = E5MessageBox.information( 193 button = E5MessageBox.information(
194 self.microPython, 194 self.microPython,
195 self.tr("Flash CircuitPython Firmware"), 195 self.tr("Flash CircuitPython Firmware"),
196 self.tr("Please reset the device to bootloader mode and confirm" 196 self.tr("Please reset the device to bootloader mode and confirm"
197 " when ready."), 197 " when ready."),
198 E5MessageBox.StandardButtons( 198 E5MessageBox.StandardButtons(
199 E5MessageBox.Abort | 199 E5MessageBox.Abort |
200 E5MessageBox.Ok)) 200 E5MessageBox.Ok))
201 if ok: 201 if button == E5MessageBox.Ok:
202 from .CircuitPythonFirmwareSelectionDialog import ( 202 from .CircuitPythonFirmwareSelectionDialog import (
203 CircuitPythonFirmwareSelectionDialog) 203 CircuitPythonFirmwareSelectionDialog)
204 dlg = CircuitPythonFirmwareSelectionDialog() 204 dlg = CircuitPythonFirmwareSelectionDialog()
205 if dlg.exec_() == QDialog.Accepted: 205 if dlg.exec_() == QDialog.Accepted:
206 cpyPath, devicePath = dlg.getData() 206 cpyPath, devicePath = dlg.getData()

eric ide

mercurial