Просмотр исходного кода

Do not allow motion to cancel a commanded shutdown

Zachary Kotlarek 9 лет назад
Родитель
Сommit
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