mirror of https://github.com/aredn/aredn.git
bugfix: snr setting was setting SignalLevel instead of NoiseLevel
ref AREDN->ticket:129
This commit is contained in:
parent
8975c46c67
commit
8eabf6ad00
|
@ -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" )
|
||||
|
|
Loading…
Reference in New Issue