fix snrlogging issue (#131)

Add default values to snr variables to avoid fatal errors that prevent 
snr.dat and snrlog/files from being written.
This commit is contained in:
Steve AB7PA 2021-07-10 10:40:28 -07:00 committed by GitHub
parent 8f1d23e565
commit 8ff4156d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -85,13 +85,13 @@ function Neighbor.create(macaddress)
n.ip=n:findIp()
n.hostname=n:findHostname()
n.signal=n:findSignal()
n.noise=n:findNoise()
n.tx_mcs=n:findTxMcs()
n.tx_rate=n:findTxRate()
n.rx_mcs=n:findRxMcs()
n.rx_rate=n:findRxRate()
n.lastseen=n:findLastTime()
n.signal=n:findSignal() or ""
n.noise=n:findNoise() or ""
n.tx_mcs=n:findTxMcs() or ""
n.tx_rate=n:findTxRate() or ""
n.rx_mcs=n:findRxMcs() or ""
n.rx_rate=n:findRxRate() or ""
n.lastseen=n:findLastTime() or now
-- check if auto-distance reset is required (new node)
local efn=n:getExistingDataFileName()
if efn==nil or ((now-n.lastseen) > 100) then -- NEW or not recently seen node