From 8ff4156d378b873f0ef9c7673c1e09c30f915b02 Mon Sep 17 00:00:00 2001 From: Steve AB7PA <69524416+ab7pa@users.noreply.github.com> Date: Sat, 10 Jul 2021 10:40:28 -0700 Subject: [PATCH] fix snrlogging issue (#131) Add default values to snr variables to avoid fatal errors that prevent snr.dat and snrlog/files from being written. --- files/usr/local/bin/snrlog | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/files/usr/local/bin/snrlog b/files/usr/local/bin/snrlog index 789a327f..47bc41a3 100755 --- a/files/usr/local/bin/snrlog +++ b/files/usr/local/bin/snrlog @@ -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