mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-07 01:54:26 +01:00
Network discovery: not showing board name is not resolvable (was printing "null")
This commit is contained in:
parent
5bbdc6dd26
commit
ca1a355628
@ -31,7 +31,7 @@ package cc.arduino.packages.discoverers;
|
|||||||
|
|
||||||
import cc.arduino.packages.BoardPort;
|
import cc.arduino.packages.BoardPort;
|
||||||
import cc.arduino.packages.Discovery;
|
import cc.arduino.packages.Discovery;
|
||||||
import cc.arduino.packages.discoverers.network.*;
|
import cc.arduino.packages.discoverers.network.NetworkChecker;
|
||||||
import processing.app.BaseNoGui;
|
import processing.app.BaseNoGui;
|
||||||
import processing.app.helpers.NetUtils;
|
import processing.app.helpers.NetUtils;
|
||||||
import processing.app.helpers.PreferencesMap;
|
import processing.app.helpers.PreferencesMap;
|
||||||
@ -141,8 +141,10 @@ public class NetworkDiscovery implements Discovery, ServiceListener, cc.arduino.
|
|||||||
String label = name + " at " + address;
|
String label = name + " at " + address;
|
||||||
if (board != null) {
|
if (board != null) {
|
||||||
String boardName = BaseNoGui.getPlatform().resolveDeviceByBoardID(BaseNoGui.packages, board);
|
String boardName = BaseNoGui.getPlatform().resolveDeviceByBoardID(BaseNoGui.packages, board);
|
||||||
|
if (boardName != null) {
|
||||||
label += " (" + boardName + ")";
|
label += " (" + boardName + ")";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BoardPort port = new BoardPort();
|
BoardPort port = new BoardPort();
|
||||||
port.setAddress(address);
|
port.setAddress(address);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user