luci-mod-admin-full: add SNR tweak option to DSL
authorAndrea Merello <andrea.merello@gmail.com>
Tue, 16 May 2017 16:41:10 +0000 (18:41 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 10 Nov 2017 14:08:38 +0000 (15:08 +0100)
Reported-by: Andrea Merello <andrea.merello@gmail.com>
[rebase onto master, fix indentation, commit subject, depend on adsl mode]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua

index bd01bda9f79389ddccce2001665d6597dba40955..83fdaadcbb961915d3c375454d9737f10f63cd5f 100644 (file)
@@ -54,6 +54,12 @@ if fs.access("/etc/init.d/dsl_control") then
                line_mode:value("", translate("auto"))
                line_mode:value("adsl", translate("ADSL"))
                line_mode:value("vdsl", translate("VDSL"))
+
+               ds_snr = dsl:option(ListValue, "ds_snr_offset", translate("Downstream SNR offset"))
+               ds_snr:depends("line_mode", "adsl")
+               for i = -50, 50, 5 do
+                       ds_snr:value(i, translate("%.1f dB" %{ i / 10} ))
+               end
        end
 
        firmware = dsl:option(Value, "firmware", translate("Firmware File"))