eric6/MicroPython/EspFirmwareSelectionDialog.py

changeset 7595
5db6bfeff23e
parent 7360
9190402e4505
child 7780
41420f82c0ac
--- a/eric6/MicroPython/EspFirmwareSelectionDialog.py	Tue May 12 17:32:16 2020 +0200
+++ b/eric6/MicroPython/EspFirmwareSelectionDialog.py	Fri May 15 18:33:53 2020 +0200
@@ -25,6 +25,14 @@
     Class implementing a dialog to select the ESP chip type and the firmware to
     be flashed.
     """
+    FlashModes = (
+        ("", ""),
+        ("Quad I/O", "qio"),
+        ("Quad Output", "qout"),
+        ("Dual I/O", "dio"),
+        ("Dual Output", "dout"),
+    )
+    
     def __init__(self, addon=False, parent=None):
         """
         Constructor
@@ -45,6 +53,9 @@
         
         self.espComboBox.addItems(["", "ESP32", "ESP8266"])
         
+        for text, mode in self.FlashModes:
+            self.modeComboBox.addItem(text, mode)
+        
         if addon:
             self.__validator = QRegularExpressionValidator(
                 QRegularExpression(r"[0-9a-fA-F]{0,4}")
@@ -93,8 +104,8 @@
         Public method to get the entered data.
         
         @return tuple containing the selected chip type, the path of the
-            firmware file and the flash address
-        @rtype tuple of (str, str, str)
+            firmware file, the flash mode and the flash address
+        @rtype tuple of (str, str, str, str)
         """
         if self.__addon:
             address = self.addressEdit.text()
@@ -104,5 +115,6 @@
         return (
             self.espComboBox.currentText().lower(),
             self.firmwarePicker.text(),
+            self.modeComboBox.currentData(),
             address,
         )

eric ide

mercurial