File tree 2 files changed +7
-21
lines changed
arduino-ide-extension/src/browser/boards
2 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -335,17 +335,12 @@ export class BoardsConfig extends React.Component<
335
335
ports = this . state . knownPorts ;
336
336
} else {
337
337
ports = this . state . knownPorts . filter ( ( port ) => {
338
- if ( port . protocol === 'serial' ) {
338
+ if ( port . protocol === 'serial' || port . protocol === 'network' ) {
339
+ // Allow all `serial` and `network` boards.
340
+ // IDE2 must support better label for unrecognized `network` boards: https://github.com/arduino/arduino-ide/issues/1331
339
341
return true ;
340
342
}
341
- // All other ports with different protocol are
342
- // only shown if there is a recognized board
343
- // connected
344
- for ( const board of this . availableBoards ) {
345
- if ( board . port ?. address === port . address ) {
346
- return true ;
347
- }
348
- }
343
+ return false ;
349
344
} ) ;
350
345
}
351
346
return ! ports . length ? (
Original file line number Diff line number Diff line change @@ -438,20 +438,11 @@ export class BoardsServiceProvider implements FrontendApplicationContribution {
438
438
const availableBoards : AvailableBoard [ ] = [ ] ;
439
439
const attachedBoards = this . _attachedBoards . filter ( ( { port } ) => ! ! port ) ;
440
440
const availableBoardPorts = availablePorts . filter ( ( port ) => {
441
- if ( port . protocol === 'serial' ) {
442
- // We always show all serial ports, even if there
443
- // is no recognized board connected to it
441
+ if ( port . protocol === 'serial' || port . protocol === 'network' ) {
442
+ // Allow all ` serial` and `network` boards.
443
+ // IDE2 must support better label for unrecognized `network` boards: https://github.com/arduino/arduino-ide/issues/1331
444
444
return true ;
445
445
}
446
-
447
- // All other ports with different protocol are
448
- // only shown if there is a recognized board
449
- // connected
450
- for ( const board of attachedBoards ) {
451
- if ( board . port ?. address === port . address ) {
452
- return true ;
453
- }
454
- }
455
446
return false ;
456
447
} ) ;
457
448
You can’t perform that action at this time.
0 commit comments