[BUGFIX] wifi link

This commit is contained in:
Martin Geno 2017-07-06 10:10:24 +02:00
parent 0a207d0170
commit 27ec9c1ab9
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
1 changed files with 4 additions and 1 deletions

View File

@ -107,7 +107,10 @@ func (builder *graphBuilder) readNodes(nodes map[string]*runtime.Node) {
for _, wifiNeighbours := range neighbours.WifiNeighbours {
for targetAddress, link := range wifiNeighbours.Neighbours {
if targetID, found := builder.macToID[targetAddress]; found {
builder.addLink(targetID, sourceID, link.Noise/link.Signal)
linkActive := link.Noise + link.Inactive + link.Signal
if linkActive > 0 {
builder.addLink(targetID, sourceID, link.Signal/linkActive)
}
}
}
}