Repaired active mode...
This commit is contained in:
parent
8b842c4295
commit
59649948d3
1 changed files with 12 additions and 2 deletions
|
@ -296,8 +296,18 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
|
||||||
|
|
||||||
$now = new DateTime();
|
$now = new DateTime();
|
||||||
$hangtime = getConfigItem("General", "ModeHang", $mmdvmconfigs);
|
$hangtime = getConfigItem("General", "ModeHang", $mmdvmconfigs);
|
||||||
$timestamp->add(new DateInterval('PT' . $hangtime . 'S'));
|
|
||||||
|
|
||||||
|
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')) {
|
if ($now->format('U') > $timestamp->format('U')) {
|
||||||
return "idle";
|
return "idle";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue