瀏覽代碼

Do not allow motion to cancel a commanded shutdown

Zachary Kotlarek 9 年之前
父節點
當前提交
1091d22a26
共有 1 個文件被更改,包括 4 次插入 和 2 次删除
  1. 4 2
      dmx/projectorCtrl.pl

+ 4 - 2
dmx/projectorCtrl.pl

@@ -133,9 +133,11 @@ while (1) {
 		$lastUser = $now;
 	}
 
-	# Motion counts as activity
+	# Motion counts as activity, unless we're about to turn off
 	if ($mtime{'MOTION'} > $lastUser) {
-		$lastUser = $mtime{'MOTION'};
+		if (!$shutdown || $timeLeftLast > $OFF_DELAY) {
+			$lastUser = $mtime{'MOTION'};
+		}
 	}
 
 	# Motion counts as activity when PLEX is not active