File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
arduino-core/src/cc/arduino/packages/discoverers/serial Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -162,19 +162,18 @@ public synchronized void forceRefresh() {
162162 Map <String , Object > boardData = platform .resolveDeviceByVendorIdProductId (port , BaseNoGui .packages );
163163
164164 BoardPort boardPort = null ;
165- boolean updatingInfos = false ;
166165 int i = 0 ;
167166 // create new board or update existing
168167 for (BoardPort board : boardPorts ) {
169168 if (board .toString ().equals (newPort )) {
170- updatingInfos = true ;
171169 boardPort = boardPorts .get (i );
172170 break ;
173171 }
174172 i ++;
175173 }
176- if (! updatingInfos ) {
174+ if (boardPort == null ) {
177175 boardPort = new BoardPort ();
176+ boardPorts .add (boardPort );
178177 }
179178 boardPort .setAddress (port );
180179 boardPort .setProtocol ("serial" );
You can’t perform that action at this time.
0 commit comments