Add average dBm value
This commit is contained in:
parent
3b166819c3
commit
6bf3cceb7c
3 changed files with 30 additions and 30 deletions
|
@ -258,20 +258,20 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
if (substr($ber, 6) != "-0/-0/-0 dBm") {
|
if (substr($ber, 6) != "-0/-0/-0 dBm") {
|
||||||
$rssiString = substr($ber, 6);
|
$rssiString = substr($ber, 6);
|
||||||
$rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
$rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||||
if ($rssiAvg > "-53") $rssi = "<img src=\"images/4.png\" \> S9+40dB";
|
if ($rssiAvg > "-53") $rssi = "<img src=\"images/4.png\" \> S9+40dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-63") $rssi = "<img src=\"images/4.png\" \> S9+30dB";
|
else if ($rssiAvg > "-63") $rssi = "<img src=\"images/4.png\" \> S9+30dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-73") $rssi = "<img src=\"images/4.png\" \> S9+20dB";
|
else if ($rssiAvg > "-73") $rssi = "<img src=\"images/4.png\" \> S9+20dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-83") $rssi = "<img src=\"images/4.png\" \> S9+10dB";
|
else if ($rssiAvg > "-83") $rssi = "<img src=\"images/4.png\" \> S9+10dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-93") $rssi = "<img src=\"images/4.png\" \> S9";
|
else if ($rssiAvg > "-93") $rssi = "<img src=\"images/4.png\" \> S9 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-99") $rssi = "<img src=\"images/3.png\" \> S8";
|
else if ($rssiAvg > "-99") $rssi = "<img src=\"images/3.png\" \> S8 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-105") $rssi = "<img src=\"images/3.png\" \> S7";
|
else if ($rssiAvg > "-105") $rssi = "<img src=\"images/3.png\" \> S7 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-111") $rssi = "<img src=\"images/2.png\" \> S6";
|
else if ($rssiAvg > "-111") $rssi = "<img src=\"images/2.png\" \> S6 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-117") $rssi = "<img src=\"images/2.png\" \> S5";
|
else if ($rssiAvg > "-117") $rssi = "<img src=\"images/2.png\" \> S5 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-123") $rssi = "<img src=\"images/1.png\" \> S4";
|
else if ($rssiAvg > "-123") $rssi = "<img src=\"images/1.png\" \> S4 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-129") $rssi = "<img src=\"images/1.png\" \> S3";
|
else if ($rssiAvg > "-129") $rssi = "<img src=\"images/1.png\" \> S3 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-135") $rssi = "<img src=\"images/0.png\" \> S2";
|
else if ($rssiAvg > "-135") $rssi = "<img src=\"images/0.png\" \> S2 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-141") $rssi = "<img src=\"images/0.png\" \> S1";
|
else if ($rssiAvg > "-141") $rssi = "<img src=\"images/0.png\" \> S1 ($rssiAvg dBm)";
|
||||||
else $rssi = "<img src=\"images/0.png\" \> S0";
|
else $rssi = "<img src=\"images/0.png\" \> S0 ($rssiAvg dBm)";
|
||||||
}
|
}
|
||||||
$ber = substr($loss, 5);
|
$ber = substr($loss, 5);
|
||||||
$loss = "";
|
$loss = "";
|
||||||
|
@ -283,20 +283,20 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") {
|
if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") {
|
||||||
$rssiString = substr($lineTokens[5], 6);
|
$rssiString = substr($lineTokens[5], 6);
|
||||||
$rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
$rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||||
if ($rssiAvg > "-53") $rssi = "<img src=\"images/4.png\" \> S9+40dB";
|
if ($rssiAvg > "-53") $rssi = "<img src=\"images/4.png\" \> S9+40dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-63") $rssi = "<img src=\"images/4.png\" \> S9+30dB";
|
else if ($rssiAvg > "-63") $rssi = "<img src=\"images/4.png\" \> S9+30dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-73") $rssi = "<img src=\"images/4.png\" \> S9+20dB";
|
else if ($rssiAvg > "-73") $rssi = "<img src=\"images/4.png\" \> S9+20dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-83") $rssi = "<img src=\"images/4.png\" \> S9+10dB";
|
else if ($rssiAvg > "-83") $rssi = "<img src=\"images/4.png\" \> S9+10dB ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-93") $rssi = "<img src=\"images/4.png\" \> S9";
|
else if ($rssiAvg > "-93") $rssi = "<img src=\"images/4.png\" \> S9 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-99") $rssi = "<img src=\"images/3.png\" \> S8";
|
else if ($rssiAvg > "-99") $rssi = "<img src=\"images/3.png\" \> S8 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-105") $rssi = "<img src=\"images/3.png\" \> S7";
|
else if ($rssiAvg > "-105") $rssi = "<img src=\"images/3.png\" \> S7 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-111") $rssi = "<img src=\"images/2.png\" \> S6";
|
else if ($rssiAvg > "-111") $rssi = "<img src=\"images/2.png\" \> S6 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-117") $rssi = "<img src=\"images/2.png\" \> S5";
|
else if ($rssiAvg > "-117") $rssi = "<img src=\"images/2.png\" \> S5 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-123") $rssi = "<img src=\"images/1.png\" \> S4";
|
else if ($rssiAvg > "-123") $rssi = "<img src=\"images/1.png\" \> S4 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-129") $rssi = "<img src=\"images/1.png\" \> S3";
|
else if ($rssiAvg > "-129") $rssi = "<img src=\"images/1.png\" \> S3 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-135") $rssi = "<img src=\"images/0.png\" \> S2";
|
else if ($rssiAvg > "-135") $rssi = "<img src=\"images/0.png\" \> S2 ($rssiAvg dBm)";
|
||||||
else if ($rssiAvg > "-141") $rssi = "<img src=\"images/0.png\" \> S1";
|
else if ($rssiAvg > "-141") $rssi = "<img src=\"images/0.png\" \> S1 ($rssiAvg dBm)";
|
||||||
else $rssi = "<img src=\"images/0.png\" \> S0";
|
else $rssi = "<img src=\"images/0.png\" \> S0 ($rssiAvg dBm)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ $localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);
|
||||||
<th>Dur (s)</th>
|
<th>Dur (s)</th>
|
||||||
<th>Loss</th>
|
<th>Loss</th>
|
||||||
<th>BER</th>
|
<th>BER</th>
|
||||||
<th>RSSI (min/max/avg)</th>
|
<th>RSSI</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -25,7 +25,7 @@ $totalLH = count($lastHeard);
|
||||||
<th>Dur (s)</th>
|
<th>Dur (s)</th>
|
||||||
<th>Loss</th>
|
<th>Loss</th>
|
||||||
<th>BER</th>
|
<th>BER</th>
|
||||||
<th>RSSI (min/max/avg)</th>
|
<th>RSSI</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue