Repaired active mode...

This commit is contained in:
dg9vh 2016-06-26 16:50:04 +00:00
parent 8b842c4295
commit 59649948d3

View file

@ -296,8 +296,18 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
$now = new DateTime();
$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')) {
return "idle";
} else {