소스 검색

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