50 ) |
50 ) |
51 self.portNameComboBox.setItemData(index, portName, self.PortNameRole) |
51 self.portNameComboBox.setItemData(index, portName, self.PortNameRole) |
52 self.portNameComboBox.setItemData(index, (vid, pid), self.VidPidRole) |
52 self.portNameComboBox.setItemData(index, (vid, pid), self.VidPidRole) |
53 |
53 |
54 self.deviceTypeComboBox.addItem("", "") |
54 self.deviceTypeComboBox.addItem("", "") |
55 for board, description in sorted( |
55 for board, description in sorted(getSupportedDevices(), key=lambda x: x[1]): |
56 getSupportedDevices(), key=lambda x: x[1] |
|
57 ): |
|
58 self.deviceTypeComboBox.addItem(description, board) |
56 self.deviceTypeComboBox.addItem(description, board) |
59 |
57 |
60 if self.portNameComboBox.currentText(): |
58 if self.portNameComboBox.currentText(): |
61 # some ports were found; use the previously selected type as |
59 # some ports were found; use the previously selected type as |
62 # default |
60 # default |