diff --git a/css/tooltip.css b/css/tooltip.css new file mode 100644 index 0000000..dd3c524 --- /dev/null +++ b/css/tooltip.css @@ -0,0 +1,46 @@ +/* Tooltip container */ +.tooltip2 { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ +} + +/* Tooltip text */ +.tooltip2 .tooltip2text { + visibility: hidden; + width: 120px; + background-color: #555; + color: #fff; + text-align: center; + padding: 5px 0; + border-radius: 6px; + + /* Position the tooltip text */ + position: absolute; + z-index: 1; + bottom: 125%; + left: 50%; + margin-left: -60px; + + /* Fade in tooltip */ + opacity: 0; + transition: opacity 1s; +} + +/* Tooltip arrow */ +.tooltip2 .tooltip2text::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; +} + +/* Show the tooltip text when you mouse over the tooltip container */ +.tooltip2:hover .tooltip2text { + visibility: visible; + opacity: 1; +} diff --git a/images/0.png b/images/0.png new file mode 100644 index 0000000..ba23827 Binary files /dev/null and b/images/0.png differ diff --git a/images/1.png b/images/1.png new file mode 100644 index 0000000..5e65098 Binary files /dev/null and b/images/1.png differ diff --git a/images/2.png b/images/2.png new file mode 100644 index 0000000..cfcd1d5 Binary files /dev/null and b/images/2.png differ diff --git a/images/3.png b/images/3.png new file mode 100644 index 0000000..54425b4 Binary files /dev/null and b/images/3.png differ diff --git a/images/4.png b/images/4.png new file mode 100644 index 0000000..b9d8a49 Binary files /dev/null and b/images/4.png differ diff --git a/include/functions.php b/include/functions.php index 7280a58..43295f7 100644 --- a/include/functions.php +++ b/include/functions.php @@ -256,7 +256,22 @@ function getHeardList($logLines, $onlyLast) { // and RSSI in BER position if (startsWith($loss,"BER")) { if (substr($ber, 6) != "-0/-0/-0 dBm") { - $rssi = substr($ber, 6); + $rssiString = substr($ber, 6); + $rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString); + if ($rssiAvg > "-53") $rssi = "
S9+40dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-63") $rssi = "
S9+30dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-73") $rssi = "
S9+20dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-83") $rssi = "
S9+10dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-93") $rssi = "
S9 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-99") $rssi = "
S8 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-105") $rssi = "
S7 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-111") $rssi = "
S6 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-117") $rssi = "
S5 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-123") $rssi = "
S4 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-129") $rssi = "
S3 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-135") $rssi = "
S2 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-141") $rssi = "
S1 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else $rssi = "
S0 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; } $ber = substr($loss, 5); $loss = ""; @@ -266,7 +281,22 @@ function getHeardList($logLines, $onlyLast) { $ber = substr($lineTokens[4], 5); } if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") { - $rssi = substr($lineTokens[5], 6); + $rssiString = substr($lineTokens[5], 6); + $rssiAvg = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString); + if ($rssiAvg > "-53") $rssi = "
S9+40dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-63") $rssi = "
S9+30dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-73") $rssi = "
S9+20dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-83") $rssi = "
S9+10dB ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-93") $rssi = "
S9 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-99") $rssi = "
S8 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-105") $rssi = "
S7 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-111") $rssi = "
S6 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-117") $rssi = "
S5 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-123") $rssi = "
S4 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-129") $rssi = "
S3 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-135") $rssi = "
S2 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else if ($rssiAvg > "-141") $rssi = "
S1 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; + else $rssi = "
S0 ($rssiAvg dBm)(min/max/avg)
$rssiString
"; } } 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); Dur (s) Loss BER - RSSI (min/max/avg) + RSSI diff --git a/include/localtx_ajax.php b/include/localtx_ajax.php index c96761a..8ab6e36 100644 --- a/include/localtx_ajax.php +++ b/include/localtx_ajax.php @@ -25,7 +25,7 @@ $totalLH = count($lastHeard); Dur (s) Loss BER - RSSI (min/max/avg) + RSSI diff --git a/index.php b/index.php index 676095c..ee11922 100644 --- a/index.php +++ b/index.php @@ -21,6 +21,8 @@ include "version.php"; + +