From 56b48f76a72da6ac6d255a5298adffe760ba93f0 Mon Sep 17 00:00:00 2001 From: Patrick Grimm Date: Wed, 10 Jul 2013 18:11:09 +0000 Subject: luci-olsr: fix snr calc olsr neighbours and unit in Legend --- applications/luci-olsr/luasrc/controller/olsr.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'applications/luci-olsr/luasrc/controller') diff --git a/applications/luci-olsr/luasrc/controller/olsr.lua b/applications/luci-olsr/luasrc/controller/olsr.lua index daedcf54d9..cdd5645b6e 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 -- cgit v1.2.3