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, 20 Jul 2018 07:28:49 +0000 (09:28 +0200)
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>
(backported from commit f0716ecd6e807799c8e16bea72d6ea98ec803d1b)

modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua

index 385e1141ec658e383d7d164aa1839d4cbdd22299..a804d8eeac8b20fd1f7d29e4aabf8e3d29701bf3 100644 (file)
@@ -46,6 +46,12 @@ if fs.access("/etc/init.d/dsl_control") then
        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
+
        firmware = dsl:option(Value, "firmware", translate("Firmware File"))
 
        m.pageaction = true