small performance tweak in mode detection \(active mode\)

This commit is contained in:
dg9vh 2016-06-03 10:00:15 +00:00
parent 016546c169
commit 2abd148127

View file

@ -260,12 +260,13 @@ function getLastHeard($logLines) {
function getActualMode($metaLastHeard, $mmdvmconfigs) { function getActualMode($metaLastHeard, $mmdvmconfigs) {
// returns mode of repeater actual working in // returns mode of repeater actual working in
$lastHeard = $metaLastHeard; //$lastHeard = $metaLastHeard;
array_multisort($lastHeard,SORT_DESC); //array_multisort($lastHeard,SORT_DESC);
$listElem = $lastHeard[0]; //$listElem = $lastHeard[0];
$listElem = $metaLastHeard[0];
$timestamp = new DateTime($listElem[0]); $timestamp = new DateTime($listElem[0]);
$mode = $listElem[1]; $mode = $listElem[1];
var_dump($listElem);
if (startsWith($mode, "DMR")) { if (startsWith($mode, "DMR")) {
$mode = "DMR"; $mode = "DMR";
} }