MicroPython: fixed a few bugs introduced by the flash speed enhancement for ESP devices.

Tue, 30 Mar 2021 19:59:24 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 30 Mar 2021 19:59:24 +0200
changeset 8185
c9acf46b54ce
parent 8183
373a5dc48c57
child 8186
655b658aa7ee

MicroPython: fixed a few bugs introduced by the flash speed enhancement for ESP devices.

eric6/MicroPython/EspDevices.py file | annotate | diff | comparison | revisions
eric6/MicroPython/EspFirmwareSelectionDialog.py file | annotate | diff | comparison | revisions
--- a/eric6/MicroPython/EspDevices.py	Mon Mar 29 19:46:49 2021 +0200
+++ b/eric6/MicroPython/EspDevices.py	Tue Mar 30 19:59:24 2021 +0200
@@ -214,20 +214,20 @@
                 "-m", "esptool",
                 "--chip", chip,
                 "--port", self.microPython.getCurrentPort(),
-                "write_flash",
             ]
             if baudRate != "115200":
-                flashArgs.extend([
+                flashArgs += [
                     "--baud", baudRate
-                ])
+                ]
+            flashArgs.append("write_flash")
             if flashMode:
-                flashArgs.extend([
+                flashArgs += [
                     "--flash_mode", flashMode
-                ])
-            flashArgs.extend([
+                ]
+            flashArgs += [
                 flashAddress,
                 firmware,
-            ])
+            ]
             dlg = E5ProcessDialog(self.tr("'esptool write_flash' Output"),
                                   self.tr("Flash MicroPython Firmware"),
                                   showProgress=True)
@@ -249,20 +249,20 @@
                 "-m", "esptool",
                 "--chip", chip,
                 "--port", self.microPython.getCurrentPort(),
-                "write_flash",
             ]
             if baudRate != "115200":
-                flashArgs.extend([
+                flashArgs += [
                     "--baud", baudRate
-                ])
+                ]
+            flashArgs.append("write_flash")
             if flashMode:
-                flashArgs.extend([
+                flashArgs += [
                     "--flash_mode", flashMode
-                ])
-            flashArgs.extend([
+                ]
+            flashArgs += [
                 flashAddress.lower(),
                 firmware,
-            ])
+            ]
             dlg = E5ProcessDialog(self.tr("'esptool write_flash' Output"),
                                   self.tr("Flash Additional Firmware"),
                                   showProgress=True)
--- a/eric6/MicroPython/EspFirmwareSelectionDialog.py	Mon Mar 29 19:46:49 2021 +0200
+++ b/eric6/MicroPython/EspFirmwareSelectionDialog.py	Tue Mar 30 19:59:24 2021 +0200
@@ -120,7 +120,7 @@
         return (
             self.espComboBox.currentText().lower(),
             self.firmwarePicker.text(),
-            self.baudRateComboBox.currentText.replace(".", ""),
+            self.baudRateComboBox.currentText().replace(".", ""),
             self.modeComboBox.currentData(),
             address,
         )

eric ide

mercurial