summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-olsr/luasrc/controller/olsr.lua
diff options
context:
space:
mode:
authorPatrick Grimm <patrick@lunatiki.de>2013-07-10 18:11:09 +0000
committerPatrick Grimm <patrick@lunatiki.de>2013-07-10 18:11:09 +0000
commit56b48f76a72da6ac6d255a5298adffe760ba93f0 (patch)
tree00d1503b3d19a2251601a22cd2434612364b3837 /applications/luci-olsr/luasrc/controller/olsr.lua
parent25c4b954a6037811ecafcf8189ab79b0f74d0aed (diff)
luci-olsr: fix snr calc olsr neighbours and unit in Legend
Diffstat (limited to 'applications/luci-olsr/luasrc/controller/olsr.lua')
-rw-r--r--applications/luci-olsr/luasrc/controller/olsr.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/applications/luci-olsr/luasrc/controller/olsr.lua b/applications/luci-olsr/luasrc/controller/olsr.lua
index daedcf54d..cdd5645b6 100644
--- a/applications/luci-olsr/luasrc/controller/olsr.lua
+++ b/applications/luci-olsr/luasrc/controller/olsr.lua
@@ -227,9 +227,9 @@ function action_neigh(json)
for assocmac, assot in pairs(val.list) do
assocmac = string.lower(assocmac or "")
if rmac == assocmac then
- signal = tonumber(assot.signal)*-1
- noise = tonumber(assot.noise)*-1
- snr = noise - signal
+ signal = tonumber(assot.signal)
+ noise = tonumber(assot.noise)
+ snr = (noise*-1) - (signal*-1)
end
end
end