eric7/MicroPython/EspDevices.py

branch
eric7
changeset 8924
7f2cad9900cf
parent 8881
54e42bc2437a
child 8945
b6be65111565
--- a/eric7/MicroPython/EspDevices.py	Sat Jan 15 18:40:57 2022 +0100
+++ b/eric7/MicroPython/EspDevices.py	Sat Jan 15 18:42:21 2022 +0100
@@ -195,22 +195,11 @@
     def __flashMicroPython(self):
         """
         Private slot to flash a MicroPython firmware to the device.
-        
-        @exception ValueError raised to indicate an unsupported chip type
         """
         from .EspFirmwareSelectionDialog import EspFirmwareSelectionDialog
         dlg = EspFirmwareSelectionDialog()
         if dlg.exec() == QDialog.DialogCode.Accepted:
-            chip, firmware, baudRate, flashMode, _ = dlg.getData()
-            if chip not in ("esp8266", "esp32"):
-                raise ValueError(self.tr("Unsupported chip type '{0}'.")
-                                 .format(chip))
-            
-            if chip == "esp8266":
-                flashAddress = "0x0000"
-            elif chip == "esp32":
-                flashAddress = "0x1000"
-            
+            chip, firmware, baudRate, flashMode, flashAddress = dlg.getData()
             flashArgs = [
                 "-u",
                 "-m", "esptool",

eric ide

mercurial