eric7/MicroPython/EspFirmwareSelectionDialog.py

branch
eric7
changeset 8945
b6be65111565
parent 8924
7f2cad9900cf
equal deleted inserted replaced
8944:84ff40a56784 8945:b6be65111565
44 FlashAddresses = { 44 FlashAddresses = {
45 "esp8266": "0x0000", 45 "esp8266": "0x0000",
46 "esp32": "0x1000", 46 "esp32": "0x1000",
47 "esp32c3": "0x0000", 47 "esp32c3": "0x0000",
48 "esp32s2": "0x1000", 48 "esp32s2": "0x1000",
49 "esp32s3": "0x1000", 49 "esp32s3": "0x0000",
50 } 50 }
51 51
52 def __init__(self, addon=False, parent=None): 52 def __init__(self, addon=False, parent=None):
53 """ 53 """
54 Constructor 54 Constructor
70 for text, chip in self.Chips: 70 for text, chip in self.Chips:
71 self.espComboBox.addItem(text, chip) 71 self.espComboBox.addItem(text, chip)
72 72
73 self.baudRateComboBox.addItems([ 73 self.baudRateComboBox.addItems([
74 "74.880", "115.200", "230.400", "460.800", "921.600", "1.500.000"]) 74 "74.880", "115.200", "230.400", "460.800", "921.600", "1.500.000"])
75 self.baudRateComboBox.setCurrentIndex(1) 75 self.baudRateComboBox.setCurrentIndex(3)
76 76
77 for text, mode in self.FlashModes: 77 for text, mode in self.FlashModes:
78 self.modeComboBox.addItem(text, mode) 78 self.modeComboBox.addItem(text, mode)
79 79
80 if addon: 80 if addon:
81 self.__validator = QRegularExpressionValidator( 81 self.__validator = QRegularExpressionValidator(
82 QRegularExpression(r"[0-9a-fA-F]{0,4}") 82 QRegularExpression(r"[0-9a-fA-F]{0,7}")
83 ) 83 )
84 self.addressEdit.setValidator(self.__validator) 84 self.addressEdit.setValidator(self.__validator)
85 else: 85 else:
86 self.addressLabel.hide() 86 self.addressLabel.hide()
87 self.addressEdit.hide() 87 self.addressEdit.hide()
119 @param firmware path to the firmware 119 @param firmware path to the firmware
120 @type str 120 @type str
121 """ 121 """
122 self.__updateOkButton() 122 self.__updateOkButton()
123 123
124 @pyqtSlot(str)
125 def on_addressEdit_textChanged(self, address):
126 """
127 Private slot handling a change of the address.
128
129 @param address entered address
130 @type str
131 """
132 self.__updateOkButton()
133
124 def getData(self): 134 def getData(self):
125 """ 135 """
126 Public method to get the entered data. 136 Public method to get the entered data.
127 137
128 @return tuple containing the selected chip type, the path of the 138 @return tuple containing the selected chip type, the path of the

eric ide

mercurial