Show connected YSFReflector in repeater-info
This commit is contained in:
parent
2436d69540
commit
1f6624f845
4 changed files with 26 additions and 2 deletions
|
@ -441,6 +441,20 @@ function getActualLink($logLines, $mode) {
|
||||||
}
|
}
|
||||||
return "not linked";
|
return "not linked";
|
||||||
break;
|
break;
|
||||||
|
case "YSF":
|
||||||
|
|
||||||
|
// 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122
|
||||||
|
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||||
|
// M: 2016-09-25 16:08:05.811 Connect to 62829 has been requested by DG9VH
|
||||||
|
foreach($logLines as $logLine) {
|
||||||
|
$to = "";
|
||||||
|
if (strpos($logLine,"Connect to")) {
|
||||||
|
$to = substr($logLine, 47, 5);
|
||||||
|
}
|
||||||
|
if ($to !== "") {
|
||||||
|
return $to;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "something went wrong!";
|
return "something went wrong!";
|
||||||
}
|
}
|
||||||
|
@ -507,6 +521,14 @@ function getActiveYSFReflectors($logLines) {
|
||||||
return $reflectorlist;
|
return $reflectorlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getYSFReflectorById($id, $reflectors) {
|
||||||
|
foreach($reflectors as $reflector) {
|
||||||
|
if ($reflector[2] === $id) {
|
||||||
|
return $reflector[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getName($callsign) {
|
function getName($callsign) {
|
||||||
if (is_numeric($callsign)) {
|
if (is_numeric($callsign)) {
|
||||||
return "---";
|
return "---";
|
||||||
|
|
|
@ -10,5 +10,6 @@ if (defined("ENABLEYSFGATEWAY")) {
|
||||||
$logLinesYSFGateway = getYSFGatewayLog();
|
$logLinesYSFGateway = getYSFGatewayLog();
|
||||||
$reverseLogLinesYSFGateway = $logLinesYSFGateway;
|
$reverseLogLinesYSFGateway = $logLinesYSFGateway;
|
||||||
array_multisort($reverseLogLinesYSFGateway,SORT_DESC);
|
array_multisort($reverseLogLinesYSFGateway,SORT_DESC);
|
||||||
|
$activeYSFReflectors = getActiveYSFReflectors($reverseLogLinesYSFGateway);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Actual Mode</th>
|
<th>Actual Mode</th>
|
||||||
<th>D-Star linked to</th>
|
<th>D-Star linked to</th>
|
||||||
|
<th>YSF linked to</th>
|
||||||
<th>DMR TS1 last linked to</th>
|
<th>DMR TS1 last linked to</th>
|
||||||
<th>DMR TS2 last linked to</th>
|
<th>DMR TS2 last linked to</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -14,12 +15,13 @@
|
||||||
echo"<tr>";
|
echo"<tr>";
|
||||||
echo"<td>".getActualMode($lastHeard, $mmdvmconfigs)."</td>";
|
echo"<td>".getActualMode($lastHeard, $mmdvmconfigs)."</td>";
|
||||||
echo"<td>".getActualLink($reverseLogLinesMMDVM, "D-Star")."</td>";
|
echo"<td>".getActualLink($reverseLogLinesMMDVM, "D-Star")."</td>";
|
||||||
|
echo"<td>".getYSFReflectorById(getActualLink($reverseLogLinesYSFGateway, "YSF"), $activeYSFReflectors)."</td>";
|
||||||
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 1")."</td>";
|
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 1")."</td>";
|
||||||
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 2")."/". getActualReflector($reverseLogLinesMMDVM, "DMR Slot 2") ."</td>";
|
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 2")."/". getActualReflector($reverseLogLinesMMDVM, "DMR Slot 2") ."</td>";
|
||||||
echo"</tr>\n";
|
echo"</tr>\n";
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">
|
<td colspan="5">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$activeYSFReflectors = getActiveYSFReflectors($reverseLogLinesYSFGateway);
|
|
||||||
if (count($activeYSFReflectors) > 0) {
|
if (count($activeYSFReflectors) > 0) {
|
||||||
?>
|
?>
|
||||||
<thead>
|
<thead>
|
||||||
|
|
Loading…
Reference in a new issue