diff --git a/include/functions.php b/include/functions.php index 79374be..a42d8e4 100644 --- a/include/functions.php +++ b/include/functions.php @@ -258,20 +258,20 @@ function getHeardList($logLines, $onlyLast) { if (substr($ber, 6) != "-0/-0/-0 dBm") { $rssiString = substr($ber, 6); $rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString); - if ($rssiAvg > "-53") $rssi = " S9+40dB"; - else if ($rssiAvg > "-63") $rssi = " S9+30dB"; - else if ($rssiAvg > "-73") $rssi = " S9+20dB"; - else if ($rssiAvg > "-83") $rssi = " S9+10dB"; - else if ($rssiAvg > "-93") $rssi = " S9"; - else if ($rssiAvg > "-99") $rssi = " S8"; - else if ($rssiAvg > "-105") $rssi = " S7"; - else if ($rssiAvg > "-111") $rssi = " S6"; - else if ($rssiAvg > "-117") $rssi = " S5"; - else if ($rssiAvg > "-123") $rssi = " S4"; - else if ($rssiAvg > "-129") $rssi = " S3"; - else if ($rssiAvg > "-135") $rssi = " S2"; - else if ($rssiAvg > "-141") $rssi = " S1"; - else $rssi = " S0"; + if ($rssiAvg > "-53") $rssi = " S9+40dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-63") $rssi = " S9+30dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-73") $rssi = " S9+20dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-83") $rssi = " S9+10dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-93") $rssi = " S9 ($rssiAvg dBm)"; + else if ($rssiAvg > "-99") $rssi = " S8 ($rssiAvg dBm)"; + else if ($rssiAvg > "-105") $rssi = " S7 ($rssiAvg dBm)"; + else if ($rssiAvg > "-111") $rssi = " S6 ($rssiAvg dBm)"; + else if ($rssiAvg > "-117") $rssi = " S5 ($rssiAvg dBm)"; + else if ($rssiAvg > "-123") $rssi = " S4 ($rssiAvg dBm)"; + else if ($rssiAvg > "-129") $rssi = " S3 ($rssiAvg dBm)"; + else if ($rssiAvg > "-135") $rssi = " S2 ($rssiAvg dBm)"; + else if ($rssiAvg > "-141") $rssi = " S1 ($rssiAvg dBm)"; + else $rssi = " S0 ($rssiAvg dBm)"; } $ber = substr($loss, 5); $loss = ""; @@ -283,20 +283,20 @@ function getHeardList($logLines, $onlyLast) { if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") { $rssiString = substr($lineTokens[5], 6); $rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString); - if ($rssiAvg > "-53") $rssi = " S9+40dB"; - else if ($rssiAvg > "-63") $rssi = " S9+30dB"; - else if ($rssiAvg > "-73") $rssi = " S9+20dB"; - else if ($rssiAvg > "-83") $rssi = " S9+10dB"; - else if ($rssiAvg > "-93") $rssi = " S9"; - else if ($rssiAvg > "-99") $rssi = " S8"; - else if ($rssiAvg > "-105") $rssi = " S7"; - else if ($rssiAvg > "-111") $rssi = " S6"; - else if ($rssiAvg > "-117") $rssi = " S5"; - else if ($rssiAvg > "-123") $rssi = " S4"; - else if ($rssiAvg > "-129") $rssi = " S3"; - else if ($rssiAvg > "-135") $rssi = " S2"; - else if ($rssiAvg > "-141") $rssi = " S1"; - else $rssi = " S0"; + if ($rssiAvg > "-53") $rssi = " S9+40dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-63") $rssi = " S9+30dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-73") $rssi = " S9+20dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-83") $rssi = " S9+10dB ($rssiAvg dBm)"; + else if ($rssiAvg > "-93") $rssi = " S9 ($rssiAvg dBm)"; + else if ($rssiAvg > "-99") $rssi = " S8 ($rssiAvg dBm)"; + else if ($rssiAvg > "-105") $rssi = " S7 ($rssiAvg dBm)"; + else if ($rssiAvg > "-111") $rssi = " S6 ($rssiAvg dBm)"; + else if ($rssiAvg > "-117") $rssi = " S5 ($rssiAvg dBm)"; + else if ($rssiAvg > "-123") $rssi = " S4 ($rssiAvg dBm)"; + else if ($rssiAvg > "-129") $rssi = " S3 ($rssiAvg dBm)"; + else if ($rssiAvg > "-135") $rssi = " S2 ($rssiAvg dBm)"; + else if ($rssiAvg > "-141") $rssi = " S1 ($rssiAvg dBm)"; + else $rssi = " S0 ($rssiAvg dBm)"; } } diff --git a/include/localtx.php b/include/localtx.php index 92bcec9..2553e03 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -28,7 +28,7 @@ $localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);