mirror of https://github.com/aredn/aredn.git
Fix txpower enable comparison
== 1 isn't the same as == "1" in Lua
This commit is contained in:
parent
bdba0c2910
commit
7d3f97519d
|
@ -450,9 +450,9 @@ if sf then
|
||||||
if is_null(cfg.wifi_txpower) or tonumber(cfg.wifi_txpower) > aredn.hardware.wifi_maxpower(cfg.wifi_channel) then
|
if is_null(cfg.wifi_txpower) or tonumber(cfg.wifi_txpower) > aredn.hardware.wifi_maxpower(cfg.wifi_channel) then
|
||||||
cfg.wifi_txpower = aredn.hardware.wifi_maxpower(cfg.wifi_channel)
|
cfg.wifi_txpower = aredn.hardware.wifi_maxpower(cfg.wifi_channel)
|
||||||
elseif tonumber(cfg.wifi_txpower) < 1 then
|
elseif tonumber(cfg.wifi_txpower) < 1 then
|
||||||
cgs.wifi_txpower = 1
|
cfg.wifi_txpower = 1
|
||||||
end
|
end
|
||||||
if cfg.wifi_enable == 1 then
|
if cfg.wifi_enable == "1" then
|
||||||
sf:write("/usr/sbin/iw dev " .. cfg.wifi_intf .. " set txpower fixed " .. cfg.wifi_txpower .. "00\n")
|
sf:write("/usr/sbin/iw dev " .. cfg.wifi_intf .. " set txpower fixed " .. cfg.wifi_txpower .. "00\n")
|
||||||
end
|
end
|
||||||
if not is_null(cfg.aprs_lat) and not is_null(cfg.aprs_lon) then
|
if not is_null(cfg.aprs_lat) and not is_null(cfg.aprs_lon) then
|
||||||
|
|
Loading…
Reference in New Issue