From ccde781847c96f93ac3911f92ecde06dc6511e47 Mon Sep 17 00:00:00 2001 From: phl0 Date: Sun, 8 Jan 2017 01:02:05 +0100 Subject: [PATCH] Filter useless -0/-0/-0 dBm values (missing RSSI) --- include/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index 24f8494..7280a58 100644 --- a/include/functions.php +++ b/include/functions.php @@ -255,7 +255,9 @@ function getHeardList($logLines, $onlyLast) { // if RF-Packet, no LOSS would be reported, so BER is in LOSS position // and RSSI in BER position if (startsWith($loss,"BER")) { - $rssi = substr($ber, 5); + if (substr($ber, 6) != "-0/-0/-0 dBm") { + $rssi = substr($ber, 6); + } $ber = substr($loss, 5); $loss = ""; } else { @@ -263,7 +265,7 @@ function getHeardList($logLines, $onlyLast) { if (array_key_exists(4,$lineTokens)) { $ber = substr($lineTokens[4], 5); } - if (array_key_exists(5,$lineTokens)) { + if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") { $rssi = substr($lineTokens[5], 6); } }