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

Allow full-power lights when Plex is not in the foreground

Zachary Kotlarek 11 лет назад
Родитель
Сommit
1b2bbf3ca8
1 измененных файлов с 4 добавлено и 6 удалено
  1. 4 6
      dmx/leds.pl

+ 4 - 6
dmx/leds.pl

@@ -132,15 +132,13 @@ while (1) {
 
 	# Calculate the new state
 	$stateLast = $state;
-	if ($exists{'BRIGHT'} || $exists{'LIGHTS'}) {
+	if ($exists{'BRIGHT'}) {
+		$newState = 'BRIGHT';
+	} elsif ($exists{'LIGHTS'}) {
 		if ($newState eq 'PLAY') {
 			$newState = 'PLAY_HIGH';
 		} else {
-			if ($exists{'BRIGHT'}) {
-				$newState = 'BRIGHT';
-			} else {
-				$newState = 'MOTION';
-			}
+			$newState = 'MOTION';
 		}
 	}
 	$state = $newState;