diff --git a/ajax.php b/ajax.php index 6b41af9..e3af8b5 100644 --- a/ajax.php +++ b/ajax.php @@ -11,6 +11,10 @@ $logLinesMMDVM = getMMDVMLog(); $reverseLogLinesMMDVM = $logLinesMMDVM; array_multisort($reverseLogLinesMMDVM,SORT_DESC); //$lastHeard = $_SESSION['lastHeard']; +if ($_GET['section'] == "mode") { + $mode = getActualMode(getLastHeard($reverseLogLinesMMDVM, TRUE), $mmdvmconfigs); + echo $mode; +} if ($_GET['section'] == "lastHeard") { $lastHeard = getLastHeard($reverseLogLinesMMDVM, FALSE); echo '{"data": '.json_encode($lastHeard)."}"; diff --git a/include/functions.php b/include/functions.php index c6da803..59ba735 100644 --- a/include/functions.php +++ b/include/functions.php @@ -328,7 +328,7 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) { if (startsWith($mode, "DMR")) { $mode = "DMR"; } - if ($listElem[6] ==="") { + if ($listElem[7] ==="") { return $mode; } else { $now = new DateTime(); diff --git a/include/repeaterinfo.php b/include/repeaterinfo.php index 0f4979b..e3fc998 100644 --- a/include/repeaterinfo.php +++ b/include/repeaterinfo.php @@ -13,7 +13,7 @@ "; - echo"".getActualMode($lastHeard, $mmdvmconfigs).""; + echo"".getActualMode($lastHeard, $mmdvmconfigs).""; echo"".getActualLink($reverseLogLinesMMDVM, "D-Star").""; echo"".getYSFReflectorById(getActualLink($reverseLogLinesYSFGateway, "YSF"), $activeYSFReflectors).""; echo"".getActualLink($reverseLogLinesMMDVM, "DMR Slot 1").""; diff --git a/include/txinfo.php b/include/txinfo.php index e414d1d..fc3c887 100644 --- a/include/txinfo.php +++ b/include/txinfo.php @@ -44,8 +44,8 @@ function doXMLHTTPRequest(scriptname, elem) { xmlhttp.send(); } -function refreshInQSOAndLastHeardList() { - doXMLHTTPRequest("txinfo.php","txline"); +function refreshMode() { + doXMLHTTPRequest("ajax.php?section=mode","mode"); } var transmitting = false; @@ -65,6 +65,7 @@ function loadXMLDoc() { xmlhttp.send(); var timeout = window.setTimeout("loadXMLDoc()", 1000); + refreshMode(); } loadXMLDoc(); diff --git a/version.php b/version.php index e182455..c861ce4 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@