added sending or receiving SMS in LH and local TX-Lists

This commit is contained in:
dg9vh 2016-05-19 20:24:59 +00:00
parent 1f03e0bf56
commit 44446bc642
3 changed files with 40 additions and 25 deletions

View file

@ -129,7 +129,7 @@ function getHeardList($logLines) {
continue; continue;
} }
if(strpos($logLine,"end of") || strpos($logLine,"watchdog has expired")) { if(strpos($logLine,"end of") || strpos($logLine,"watchdog has expired") || strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) {
$lineTokens = explode(", ",$logLine); $lineTokens = explode(", ",$logLine);
$duration = strtok($lineTokens[2], " "); $duration = strtok($lineTokens[2], " ");
@ -144,6 +144,16 @@ function getHeardList($logLines) {
$ber = substr($lineTokens[4], 5); $ber = substr($lineTokens[4], 5);
} }
if (strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) {
switch (substr($logLine, 27, strpos($logLine,",") - 27)) {
case "DMR Slot 1":
$ts1duration = "SMS";
break;
case "DMR Slot 2":
$ts2duration = "SMS";
break;
}
} else {
switch (substr($logLine, 27, strpos($logLine,",") - 27)) { switch (substr($logLine, 27, strpos($logLine,",") - 27)) {
case "D-Star": case "D-Star":
$dstarduration = $duration; $dstarduration = $duration;
@ -167,6 +177,7 @@ function getHeardList($logLines) {
break; break;
} }
} }
}
$timestamp = substr($logLine, 3, 19); $timestamp = substr($logLine, 3, 19);
$mode = substr($logLine, 27, strpos($logLine,",") - 27); $mode = substr($logLine, 27, strpos($logLine,",") - 27);

View file

@ -28,6 +28,8 @@ for ($i = 0; ($i < LHLINES) AND ($i < count($lastHeard)); $i++) {
echo"<td>$listElem[5]</td>"; echo"<td>$listElem[5]</td>";
if ($listElem[6] == null) { if ($listElem[6] == null) {
echo'<td colspan="3">transmitting</td>'; echo'<td colspan="3">transmitting</td>';
} else if ($listElem[6] == "SMS") {
echo'<td colspan="3">sending or receiving SMS</td>';
} else { } else {
echo"<td>$listElem[6]</td>"; echo"<td>$listElem[6]</td>";
echo"<td>$listElem[7]</td>"; echo"<td>$listElem[7]</td>";

View file

@ -34,6 +34,8 @@ for ($i = 0; $i < count($localTXList); $i++) {
echo"<td>$listElem[5]</td>"; echo"<td>$listElem[5]</td>";
if ($listElem[6] == null) { if ($listElem[6] == null) {
echo'<td colspan="3">transmitting</td>'; echo'<td colspan="3">transmitting</td>';
} else if ($listElem[6] == "SMS") {
echo'<td colspan="3">sending or receiving SMS</td>';
} else { } else {
echo"<td>$listElem[6]</td>"; echo"<td>$listElem[6]</td>";
echo"<td>$listElem[7]</td>"; echo"<td>$listElem[7]</td>";