more speed improvements...
This commit is contained in:
parent
535172b6fd
commit
388a9a3acc
1 changed files with 24 additions and 5 deletions
|
@ -104,6 +104,9 @@ function getLog() {
|
||||||
function getHeardList($logLines) {
|
function getHeardList($logLines) {
|
||||||
//array_multisort($logLines,SORT_DESC);
|
//array_multisort($logLines,SORT_DESC);
|
||||||
$heardList = array();
|
$heardList = array();
|
||||||
|
$heardCalls = array();
|
||||||
|
$counter = 0;
|
||||||
|
$counter2 = 0;
|
||||||
$ts1duration = "";
|
$ts1duration = "";
|
||||||
$ts1loss = "";
|
$ts1loss = "";
|
||||||
$ts1ber = "";
|
$ts1ber = "";
|
||||||
|
@ -227,12 +230,28 @@ function getHeardList($logLines) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callsign or ID should be less than 8 chars long, otherwise it could be errorneous
|
// Callsign or ID should be less than 8 chars long, otherwise it could be errorneous
|
||||||
if ( strlen($callsign) < 10 ) {
|
if ( strlen($callsign) <= 10 ) {
|
||||||
array_push($heardList, array($timestamp, $mode, $callsign, $id, $target, $source, $duration, $loss, $ber));
|
if(!(array_search($callsign."#".$mode.$id, $heardCalls) > -1) && ($source == "Network")) {
|
||||||
$duration = "";
|
array_push($heardCalls, $callsign."#".$mode.$id);
|
||||||
$loss ="";
|
$counter++;
|
||||||
$ber = "";
|
}
|
||||||
|
if (($counter <= LHLINES) && ($source == "Network")) {
|
||||||
|
array_push($heardList, array($timestamp, $mode, $callsign, $id, $target, $source, $duration, $loss, $ber));
|
||||||
|
$duration = "";
|
||||||
|
$loss ="";
|
||||||
|
$ber = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($counter2 <= 10) && ($source == "RF")) {
|
||||||
|
array_push($heardList, array($timestamp, $mode, $callsign, $id, $target, $source, $duration, $loss, $ber));
|
||||||
|
$duration = "";
|
||||||
|
$loss ="";
|
||||||
|
$ber = "";
|
||||||
|
$counter2++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return $heardList;
|
return $heardList;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue