Merge pull request #43 from phl0/P25

Add basic support for P25
This commit is contained in:
Kim - DG9VH 2016-09-20 14:03:39 +02:00 committed by GitHub
commit b0af1da0e2
3 changed files with 80 additions and 67 deletions

View file

@ -135,6 +135,7 @@ function getYSFGatewayLog() {
// M: 2016-04-29 00:15:00.013 D-Star, received network header from DG9VH /ZEIT to CQCQCQ via DCS002 S
// M: 2016-04-29 19:43:21.839 DMR Slot 2, received network voice header from DL1ESZ to TG 9
// M: 2016-04-30 14:57:43.072 DMR Slot 2, received RF voice header from DG9VH to 5000
// M: 2016-09-16 09:14:12.886 P25, received RF from DF2ET to TG10100
function getHeardList($logLines, $onlyLast) {
$heardList = array();
$ts1duration = "";
@ -217,6 +218,11 @@ function getHeardList($logLines, $onlyLast) {
$ysfloss = $loss;
$ysfber = $ber;
break;
case "P25":
$p25duration = $duration;
$p25loss = $loss;
$p25ber = $ber;
break;
}
}
}
@ -262,6 +268,11 @@ function getHeardList($logLines, $onlyLast) {
$loss = $ysfloss;
$ber = $ysfber;
break;
case "P25":
$duration = $p25duration;
$loss = $p25loss;
$ber = $p25ber;
break;
}
// Callsign or ID should be less than 11 chars long, otherwise it could be errorneous
@ -285,7 +296,7 @@ function getLastHeard($logLines, $onlyLast) {
$heardList = getHeardList($logLines, $onlyLast);
$counter = 0;
foreach ($heardList as $listElem) {
if ( ($listElem[1] == "D-Star") || ($listElem[1] == "YSF") || (startsWith($listElem[1], "DMR")) ) {
if ( ($listElem[1] == "D-Star") || ($listElem[1] == "YSF") || ($listElem[1] == "P25") || (startsWith($listElem[1], "DMR")) ) {
if(!(array_search($listElem[2]."#".$listElem[1].$listElem[3], $heardCalls) > -1)) {
array_push($heardCalls, $listElem[2]."#".$listElem[1].$listElem[3]);
array_push($lastHeard, $listElem);

View file

@ -34,7 +34,7 @@ $localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);
<?php
for ($i = 0; $i < count($localTXList); $i++) {
$listElem = $localTXList[$i];
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF")) {
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
echo"<tr>";
echo"<td nowrap>$listElem[0]</td>";
echo"<td nowrap>$listElem[1]</td>";

View file

@ -10,6 +10,8 @@
<?php showMode("D-Star Network", $mmdvmconfigs);?>
<?php showMode("System Fusion", $mmdvmconfigs);?>
<?php showMode("System Fusion Network", $mmdvmconfigs);?>
<?php showMode("P25", $mmdvmconfigs);?>
<?php showMode("P25 Network", $mmdvmconfigs);?>
</tr>
</table>
</div>