From 27ec9c1ab9e12aa31dac1f6a77963313d9d7c449 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Thu, 6 Jul 2017 10:10:24 +0200 Subject: [PATCH] [BUGFIX] wifi link --- output/meshviewer/graph.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/output/meshviewer/graph.go b/output/meshviewer/graph.go index 3386cd3..fd72312 100644 --- a/output/meshviewer/graph.go +++ b/output/meshviewer/graph.go @@ -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) + } } } }