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 |