Merge pull request #99 from pjao/master
Fixing do not present the Header of Talker Alias
This commit is contained in:
commit
eadb8b3af8
1 changed files with 12 additions and 9 deletions
|
@ -263,6 +263,7 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
|
|
||||||
if(strpos($logLine, "0000") > 0){
|
if(strpos($logLine, "0000") > 0){
|
||||||
$decodedAlias = decodeAlias($logLine);
|
$decodedAlias = decodeAlias($logLine);
|
||||||
|
if ($decodedAlias == "" && $alias =="") $decodedAlias="---";
|
||||||
if ($alias =="")
|
if ($alias =="")
|
||||||
$alias =$decodedAlias;
|
$alias =$decodedAlias;
|
||||||
else
|
else
|
||||||
|
@ -829,15 +830,17 @@ function getName($callsign) {
|
||||||
// M: 2017-02-13 15:53:30.991 0000: 04 00 5E 49 57 38 44 59 94 *..^IW8DY.*
|
// M: 2017-02-13 15:53:30.991 0000: 04 00 5E 49 57 38 44 59 94 *..^IW8DY.*
|
||||||
// M: 2017-02-13 15:53:31.253 0000: 05 00 20 47 69 6F 76 61 DC *.. Giova.*
|
// M: 2017-02-13 15:53:31.253 0000: 05 00 20 47 69 6F 76 61 DC *.. Giova.*
|
||||||
function decodeAlias($logLine) {
|
function decodeAlias($logLine) {
|
||||||
$tok1 = "";
|
|
||||||
if (substr($logLine, 34, 2) !=="04")
|
if (substr($logLine, 34, 2) !=="04")
|
||||||
|
{
|
||||||
$tok1 = encode(substr($logLine, 40, 2));
|
$tok1 = encode(substr($logLine, 40, 2));
|
||||||
$tok2 = encode(substr($logLine, 43, 2));
|
$tok2 = encode(substr($logLine, 43, 2));
|
||||||
$tok3 = encode(substr($logLine, 46, 2));
|
$tok3 = encode(substr($logLine, 46, 2));
|
||||||
$tok4 = encode(substr($logLine, 49, 2));
|
$tok4 = encode(substr($logLine, 49, 2));
|
||||||
$tok5 = encode(substr($logLine, 52, 2));
|
$tok5 = encode(substr($logLine, 52, 2));
|
||||||
$tok6 = encode(substr($logLine, 55, 2));
|
$tok6 = encode(substr($logLine, 55, 2));
|
||||||
$tok7 = encode(dechex(hexdec(substr($logLine, 58, 2))/2));
|
$tok7 = encode(dechex(hexdec(substr($logLine, 58, 2))/2));
|
||||||
return $tok1.$tok2.$tok3.$tok4.$tok5.$tok6.$tok7;
|
return $tok1.$tok2.$tok3.$tok4.$tok5.$tok6.$tok7;
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue