eric7/MicroPython/EspDevices.py

branch
eric7-maintenance
changeset 8941
e1f6a9e53979
parent 8924
7f2cad9900cf
child 8945
b6be65111565
diff -r a906ba97c1fe -r e1f6a9e53979 eric7/MicroPython/EspDevices.py
--- a/eric7/MicroPython/EspDevices.py	Tue Jan 04 15:38:11 2022 +0100
+++ b/eric7/MicroPython/EspDevices.py	Tue Feb 08 14:15:48 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