Also match network map link by short address (#1611)

This commit is contained in:
clockbrain 2019-06-09 16:16:38 +10:00 committed by Koen Kanters
parent 70fbe714e3
commit b663e37fd9

View File

@ -51,7 +51,7 @@ class NetworkMap {
const friendlyName = friendlyDevice ? friendlyDevice.friendly_name : device.ieeeAddr;
// Add friendly name
labels.push(friendlyName);
labels.push(friendlyName+":"+device.nwkAddr);
// Add the device type
const deviceType = utils.correctDeviceType(device);
@ -87,7 +87,7 @@ class NetworkMap {
* NOTE: There are situations where a device is NOT in the topology, this can be e.g.
* due to not responded to the lqi scan. In that case we do not add an edge for this device.
*/
topology.filter((e) => e.ieeeAddr === device.ieeeAddr).forEach((e) => {
topology.filter((e) => (e.ieeeAddr === device.ieeeAddr) || (e.nwkAddr === device.nwkAddr)).forEach((e) => {
const lineStyle = (e.lqi==0) ? `style="dashed", ` : ``;
text += ` "${device.ieeeAddr}" -> "${e.parent}" [`+lineStyle+`label="${e.lqi}"]\n`;
});