Globally reduce copyright headers
[project/luci.git] / applications / luci-app-olsr / luasrc / tools / olsr.lua
1 -- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.tools.olsr", package.seeall)
5
6 function etx_color(etx)
7         local color = "#bb3333"
8         if etx == 0 then
9                 color = "#bb3333"
10         elseif etx < 2 then
11                 color = "#00cc00"
12         elseif etx < 4 then
13                 color = "#ffcb05"
14         elseif etx < 10 then
15                 color = "#ff6600"
16         end
17         return color
18 end
19
20 function snr_color(snr)
21         local color = "#bb3333"
22         if snr == 0 then
23                 color = "#bb3333"
24         elseif snr > 30 then
25                 color = "#00cc00"
26         elseif snr > 20 then
27                 color = "#ffcb05"
28         elseif snr > 5 then
29                 color = "#ff6600"
30         end
31         return color
32 end
33