We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19598fa commit 095bfb4Copy full SHA for 095bfb4
arduino-core/src/cc/arduino/packages/discoverers/serial/SerialDiscovery.java
@@ -162,19 +162,18 @@ public synchronized void forceRefresh() {
162
Map<String, Object> boardData = platform.resolveDeviceByVendorIdProductId(port, BaseNoGui.packages);
163
164
BoardPort boardPort = null;
165
- boolean updatingInfos = false;
166
int i = 0;
167
// create new board or update existing
168
for (BoardPort board : boardPorts) {
169
if (board.toString().equals(newPort)) {
170
- updatingInfos = true;
171
boardPort = boardPorts.get(i);
172
break;
173
}
174
i++;
175
176
- if (!updatingInfos) {
+ if (boardPort == null) {
177
boardPort = new BoardPort();
+ boardPorts.add(boardPort);
178
179
boardPort.setAddress(port);
180
boardPort.setProtocol("serial");
0 commit comments