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() |