added YSF in LH, tnx to Ron, VE1AIC

This commit is contained in:
dg9vh 2016-05-04 21:37:24 +02:00
parent 283e6dd113
commit 20af947be0

View file

@ -28,6 +28,9 @@ function getHeardList($logLines) {
$dstarduration = ""; $dstarduration = "";
$dstarloss = ""; $dstarloss = "";
$dstarber = ""; $dstarber = "";
$ysfduration = "";
$ysfloss = "";
$ysfber = "";
foreach ($logLines as $logLine) { foreach ($logLines as $logLine) {
$duration = ""; $duration = "";
$loss = ""; $loss = "";
@ -70,6 +73,11 @@ function getHeardList($logLines) {
$ts2loss = $loss; $ts2loss = $loss;
$ts2ber = $ber; $ts2ber = $ber;
break; break;
case "YSF":
$ysfduration = $duration;
$ysfloss = $loss;
$ysfber = $ber;
break;
} }
} }
$timestamp = substr($logLine, 3, 19); $timestamp = substr($logLine, 3, 19);
@ -106,6 +114,11 @@ function getHeardList($logLines) {
$loss = $ts2loss; $loss = $ts2loss;
$ber = $ts2ber; $ber = $ts2ber;
break; break;
case "YSF":
$duration = $ysfduration;
$loss = $ysfloss;
$ber = $ysfber;
break;
} }
@ -124,7 +137,7 @@ function getLastHeard($logLines) {
$heardCalls = array(); $heardCalls = array();
$heardList = getHeardList($logLines); $heardList = getHeardList($logLines);
foreach ($heardList as $listElem) { foreach ($heardList as $listElem) {
if ( ($listElem[1] == "D-Star") || (startsWith($listElem[1], "DMR")) ) { if ( ($listElem[1] == "D-Star") || ($listElem[1] == "YSF") || (startsWith($listElem[1], "DMR")) ) {
if(!(array_search($listElem[2]."#".$listElem[1].$listElem[3], $heardCalls) > -1)) { if(!(array_search($listElem[2]."#".$listElem[1].$listElem[3], $heardCalls) > -1)) {
array_push($heardCalls, $listElem[2]."#".$listElem[1].$listElem[3]); array_push($heardCalls, $listElem[2]."#".$listElem[1].$listElem[3]);
array_push($lastHeard, $listElem); array_push($lastHeard, $listElem);