From 8eabf6ad009110246aea47d384ff2a391e454876 Mon Sep 17 00:00:00 2001 From: Conrad Lara - KG6JEI Date: Thu, 2 Jul 2015 22:43:01 -0700 Subject: [PATCH] bugfix: snr setting was setting SignalLevel instead of NoiseLevel ref AREDN->ticket:129 --- files/www/cgi-bin/perlfunc.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/www/cgi-bin/perlfunc.pm b/files/www/cgi-bin/perlfunc.pm index 985c1cd9..6980ed44 100644 --- a/files/www/cgi-bin/perlfunc.pm +++ b/files/www/cgi-bin/perlfunc.pm @@ -615,14 +615,14 @@ sub get_wifi_signal $NoiseFloor=$1; } - if ( $SignalLevel == "N/A" ) + if ( $NoiseFloor == "N/A" ) { - open( my $SignalFH , "<" , "/sys/kernel/debug/ieee80211/phy0/ath9k/dump_nfcal") or return ("N/A","N/A"); - while (<$SignalFH>) { + open( my $NoiseFH , "<" , "/sys/kernel/debug/ieee80211/phy0/ath9k/dump_nfcal") or return ("N/A","N/A"); + while (<$NoiseFH>) { next unless /Channel Noise Floor : ([-]?[0-9]+)/; - $SignalLevel=$1; + $NoiseFloor=$1; } - close($SignalFH); + close($NoiseFH); } if ( $SignalLevel == "N/A" || $NoiseFloor == "N/A" )