mirror of https://github.com/aredn/aredn.git
Move multi ant detection into main run method (#229)
to avoid startup failures.
This commit is contained in:
parent
4f720b4afc
commit
861db07ad6
|
@ -54,12 +54,7 @@ if not file_exists(logfile) then
|
||||||
io.open(logfile, "w+"):close()
|
io.open(logfile, "w+"):close()
|
||||||
end
|
end
|
||||||
|
|
||||||
local wifiiface = get_ifname("wifi")
|
|
||||||
|
|
||||||
local multiple_ant = false
|
local multiple_ant = false
|
||||||
if read_all("/sys/kernel/debug/ieee80211/" .. iwinfo.nl80211.phyname(wifiiface) .. "/ath9k/tx_chainmask"):chomp() ~= "1" then
|
|
||||||
multiple_ant = true
|
|
||||||
end
|
|
||||||
|
|
||||||
local log = aredn.log.open(logfile, 16000)
|
local log = aredn.log.open(logfile, 16000)
|
||||||
|
|
||||||
|
@ -67,6 +62,12 @@ function run_monitor()
|
||||||
|
|
||||||
local now = nixio.sysinfo().uptime
|
local now = nixio.sysinfo().uptime
|
||||||
|
|
||||||
|
local wifiiface = get_ifname("wifi")
|
||||||
|
|
||||||
|
if read_all("/sys/kernel/debug/ieee80211/" .. iwinfo.nl80211.phyname(wifiiface) .. "/ath9k/tx_chainmask"):chomp() ~= "1" then
|
||||||
|
multiple_ant = true
|
||||||
|
end
|
||||||
|
|
||||||
-- load history
|
-- load history
|
||||||
local rssi_hist = {}
|
local rssi_hist = {}
|
||||||
for line in io.lines(datfile) do
|
for line in io.lines(datfile) do
|
||||||
|
|
Loading…
Reference in New Issue