Repaired active mode...
This commit is contained in:
parent
fc0369be0f
commit
d554429975
2 changed files with 22 additions and 19 deletions
|
@ -298,25 +298,28 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
|
|||
if (startsWith($mode, "DMR")) {
|
||||
$mode = "DMR";
|
||||
}
|
||||
|
||||
$now = new DateTime();
|
||||
$hangtime = getConfigItem("General", "ModeHang", $mmdvmconfigs);
|
||||
|
||||
if ($hangtime != "") {
|
||||
$timestamp->add(new DateInterval('PT' . $hangtime . 'S'));
|
||||
} else {
|
||||
$source = $listElem[6];
|
||||
if ($source === "Network") {
|
||||
$hangtime = getConfigItem("General", "NetModeHang", $mmdvmconfigs);
|
||||
} else {
|
||||
$hangtime = getConfigItem("General", "RFModeHang", $mmdvmconfigs);
|
||||
}
|
||||
$timestamp->add(new DateInterval('PT' . $hangtime . 'S'));
|
||||
}
|
||||
if ($now->format('U') > $timestamp->format('U')) {
|
||||
return "idle";
|
||||
} else {
|
||||
if ($listElem[6] ==="") {
|
||||
return $mode;
|
||||
} else {
|
||||
$now = new DateTime();
|
||||
$hangtime = getConfigItem("General", "ModeHang", $mmdvmconfigs);
|
||||
|
||||
if ($hangtime != "") {
|
||||
$timestamp->add(new DateInterval('PT' . $hangtime . 'S'));
|
||||
} else {
|
||||
$source = $listElem[6];
|
||||
if ($source === "Network") {
|
||||
$hangtime = getConfigItem("General", "NetModeHang", $mmdvmconfigs);
|
||||
} else {
|
||||
$hangtime = getConfigItem("General", "RFModeHang", $mmdvmconfigs);
|
||||
}
|
||||
$timestamp->add(new DateInterval('PT' . $hangtime . 'S'));
|
||||
}
|
||||
if ($now->format('U') > $timestamp->format('U')) {
|
||||
return "idle";
|
||||
} else {
|
||||
return $mode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
define("VERSION", "20160721-1");
|
||||
define("VERSION", "20160810-1");
|
||||
?>
|
Loading…
Reference in a new issue