1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-17 11:54:33 +01:00

Use correctly the setBoardName() method in NetworkDiscovery

This commit is contained in:
Cristian Maglie 2018-11-23 18:34:52 +01:00
parent 9ba172b0db
commit cfd3cf2b27

View File

@ -113,15 +113,12 @@ public class NetworkDiscovery implements Discovery, ServiceListener, Runnable {
String label = name + " at " + address;
if (board != null && BaseNoGui.packages != null) {
String boardName = BaseNoGui.getPlatform().resolveDeviceByBoardID(BaseNoGui.packages, board);
if (boardName != null) {
label += " (" + boardName + ")";
}
port.setBoardName(boardName);
} else if (description != null) {
label += " (" + description + ")";
}
port.setAddress(address);
port.setBoardName(name);
port.setProtocol("network");
port.setLabel(label);