fixed entries in lh-lists when transmitting gps...

This commit is contained in:
dg9vh 2017-01-13 21:23:11 +00:00
parent d841e6f4c2
commit 8cdfb67c7b
2 changed files with 10 additions and 5 deletions

View file

@ -357,19 +357,24 @@ function getHeardList($logLines, $onlyLast) {
$timestamp = substr($logLine, 3, 19); $timestamp = substr($logLine, 3, 19);
$mode = substr($logLine, 27, strpos($logLine,",") - 27); $mode = substr($logLine, 27, strpos($logLine,",") - 27);
$callsign2 = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6); $topos = strpos($logLine, "to");
if ($topos == strpos($logLine, "to follow")) {
$topos = strpos($logLine, "to", strpos($logLine, "to follow)") + 1);
}
$callsign2 = substr($logLine, strpos($logLine,"from") + 5, $topos - strpos($logLine,"from") - 6);
$callsign = $callsign2; $callsign = $callsign2;
if (strpos($callsign2,"/") > 0) { if (strpos($callsign2,"/") > 0) {
$callsign = substr($callsign2, 0, strpos($callsign2,"/")); $callsign = substr($callsign2, 0, strpos($callsign2,"/"));
} }
$callsign = trim($callsign); $callsign = trim($callsign);
$id =""; $id ="";
if ($mode == "D-Star") { if ($mode == "D-Star") {
$id = substr($callsign2, strpos($callsign2,"/") + 1); $id = substr($callsign2, strpos($callsign2,"/") + 1);
} }
$target = substr($logLine, strpos($logLine, "to") + 3);
$target = substr($logLine, $topos + 3);
$source = "RF"; $source = "RF";
if (strpos($logLine,"network") > 0 ) { if (strpos($logLine,"network") > 0 ) {
$source = "Net"; $source = "Net";

View file

@ -1,3 +1,3 @@
<?php <?php
define("VERSION", "20170108-1"); define("VERSION", "20170113-1");
?> ?>