Browse Source

Do not allow motion to cancel a commanded shutdown

Zachary Kotlarek 9 years ago
parent
commit
1091d22a26
1 changed files with 4 additions and 2 deletions
  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