Filter useless -0/-0/-0 dBm values (missing RSSI)

This commit is contained in:
phl0 2017-01-08 01:02:05 +01:00
parent 688aea1b30
commit ccde781847
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A

View file

@ -255,7 +255,9 @@ function getHeardList($logLines, $onlyLast) {
// if RF-Packet, no LOSS would be reported, so BER is in LOSS position // if RF-Packet, no LOSS would be reported, so BER is in LOSS position
// and RSSI in BER position // and RSSI in BER position
if (startsWith($loss,"BER")) { if (startsWith($loss,"BER")) {
$rssi = substr($ber, 5); if (substr($ber, 6) != "-0/-0/-0 dBm") {
$rssi = substr($ber, 6);
}
$ber = substr($loss, 5); $ber = substr($loss, 5);
$loss = ""; $loss = "";
} else { } else {
@ -263,7 +265,7 @@ function getHeardList($logLines, $onlyLast) {
if (array_key_exists(4,$lineTokens)) { if (array_key_exists(4,$lineTokens)) {
$ber = substr($lineTokens[4], 5); $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); $rssi = substr($lineTokens[5], 6);
} }
} }