TNX to SA7BNT
This commit is contained in:
Kim Huebel 2018-04-04 20:37:11 +00:00
parent 177d66f811
commit aa337c64fb
7 changed files with 1053 additions and 1 deletions

View file

@ -23,9 +23,13 @@ if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
if (!defined("TIMEZONE"))
define("TIMEZONE", "UTC");
if (defined("RESOLVETGS")) {
$tgList = getTGList();
}
$logLinesMMDVM = getMMDVMLog();
$reverseLogLinesMMDVM = $logLinesMMDVM;
rsort($reverseLogLinesMMDVM);
if ($_GET['section'] == "mode") {
$mode = getActualMode(getLastHeard($reverseLogLinesMMDVM, TRUE), $mmdvmconfigs);
echo $mode;

1017
database/tgs.csv Normal file

File diff suppressed because it is too large Load diff

View file

@ -471,6 +471,10 @@ function getHeardList($logLines, $onlyLast) {
$target = substr($logLine, $topos + 3);
$target = preg_replace('/\s/', ' ', $target);
if (defined("RESOLVETGS")) {
$target = $target." ".getTGName($target);
}
$source = "RF";
if (strpos($logLine,"network") > 0 ) {
$source = "Net";
@ -995,4 +999,21 @@ function getDMRplusDMRMasterList() {
}
return $s;
}
function getTGList() {
$list = array_map('str_getcsv', file(getcwd().'/database/tgs.csv'));
return $list;
}
function getTGName($id) {
global $tgList;
$name ="";
if (startsWith($id, "TG")) {
$name = $tgList[recursive_array_search(substr($id, 8), $tgList)][2];
// $name = substr($id, 8);
return "(".$name.")";
} else {
return $name;
}
}
?>

View file

@ -5,6 +5,9 @@ if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
if (!defined("TIMEZONE"))
define("TIMEZONE", "UTC");
if (defined("RESOLVETGS")) {
$tgList = getTGList();
}
$logLinesMMDVM = getMMDVMLog();
showLapTime("getMMDVMLog");
$reverseLogLinesMMDVM = $logLinesMMDVM;

View file

@ -106,6 +106,10 @@ include "include/tools.php";
<span class="input-group-addon" id="DMRIDDATPATH" style="width: 300px"><?php echo _("Path to DMR-ID-Database-File (including filename)"); ?></span>
<input type="text" value="<?php echo constant("DMRIDDATPATH") ?>" name="DMRIDDATPATH" class="form-control" placeholder="/var/mmdvm/DMRIDs.dat" aria-describedby="DMRIDDATPATH">
</div>
<div class="input-group">
<span class="input-group-addon" id="RESOLVETGS" style="width: 300px"><?php echo _("Enable TG-Names"); ?></span>
<div class="panel-body"><input type="checkbox" name="RESOLVETGS" <?php if (defined("RESOLVETGS")) echo "checked" ?>></div>
</div>
</div>
<div class="container">
<h2><?php echo _("YSFGateway-Configuration"); ?></h2>

View file

@ -6,6 +6,9 @@ include "config/config.php";
include "include/tools.php";
include "include/functions.php";
$mmdvmconfigs = getMMDVMConfig();
if (defined("RESOLVETGS")) {
$tgList = getTGList();
}
if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
if (!defined("TIMEZONE"))

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20180404-2 (".getGitVersion().")");
define("VERSION", "20180404-3 (".getGitVersion().")");
?>