Fixed double display of local transmissions.
This commit is contained in:
parent
62b6fbdb79
commit
35c2980280
3 changed files with 81 additions and 70 deletions
5
ajax.php
5
ajax.php
|
@ -111,7 +111,7 @@ if ($_GET['section'] == "localTx") {
|
|||
$call_canon = substr($call_canon, 0, strpos($call_canon, "-"));
|
||||
}
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
$listElem[11] ="";
|
||||
//$listElem[11] ="";
|
||||
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN")) {
|
||||
$listElem[3] = getName($call_canon);
|
||||
if ($listElem[2] !== "??????????") {
|
||||
|
@ -126,9 +126,10 @@ if ($_GET['section'] == "localTx") {
|
|||
}
|
||||
}
|
||||
array_push($lastHeard, $listElem);
|
||||
$oldListElem = $listElem;
|
||||
}
|
||||
} else {
|
||||
$listElem[10] ="";
|
||||
//$listElem[10] ="";
|
||||
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN")) {
|
||||
if ($listElem[2] !== "??????????") {
|
||||
if (!is_numeric($listElem[2])) {
|
||||
|
|
|
@ -246,7 +246,8 @@ function showMode($mode, $mmdvmconfigs) {
|
|||
function getMMDVMLog() {
|
||||
// Open Logfile and copy loglines into LogLines-Array()
|
||||
$logPath = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||
$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
||||
//$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
||||
$logLines = explode("\n", `egrep -h "from|watchdog|lost|POCSAG" $logPath`);
|
||||
return $logLines;
|
||||
}
|
||||
|
||||
|
@ -496,6 +497,9 @@ function getHeardList($logLines, $onlyLast) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!$onlyLast)
|
||||
continue;
|
||||
}
|
||||
$timestamp = substr($logLine, 3, 23);
|
||||
$mode = substr($logLine, 27, strpos($logLine,",") - 27);
|
||||
|
@ -594,6 +598,16 @@ function getHeardList($logLines, $onlyLast) {
|
|||
} else {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
$alias = "";
|
||||
}/*
|
||||
$duration = "";
|
||||
$loss = "";
|
||||
$ber = "";
|
||||
$rssi = "";
|
||||
$ts1alias = "---";
|
||||
$ts2alias = "---";*/
|
||||
if ($onlyLast && count($heardList )> 20) {
|
||||
return $heardList;
|
||||
}
|
||||
}
|
||||
$duration = "";
|
||||
$loss = "";
|
||||
|
@ -601,10 +615,6 @@ function getHeardList($logLines, $onlyLast) {
|
|||
$rssi = "";
|
||||
$ts1alias = "---";
|
||||
$ts2alias = "---";
|
||||
if ($onlyLast && count($heardList )> 20) {
|
||||
return $heardList;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $heardList;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
define("VERSION", "20200922-1 (".getGitVersion().")");
|
||||
define("VERSION", "20201029-1 (".getGitVersion().")");
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue