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

Be more conservative about updates at init -- this process is generally long-running and we would prefer to let the projector run for 15 minutes after a crash than have it shutdown immediately at boot.

Zachary Kotlarek 14 лет назад
Родитель
Сommit
45be29fa04
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      projector/projectorPower.pl

+ 2 - 2
projector/projectorPower.pl

@@ -40,7 +40,7 @@ my $sock = IO::Socket::UNIX->new(
 # State
 my $state      = 'INIT';
 my $stateLast  = $state;
-my $updateLast = 0;
+my $updateLast = time();
 my $projector  = 0;
 
 # Loop forever
@@ -81,7 +81,7 @@ while (1) {
 		print STDERR 'Time since update: ' . $timeSinceUpdate . "\n";
 	}
 	if ($state eq 'INIT') {
-		$state = 'OFF';
+		$state = 'COUNTDOWN';
 		if ($projector) {
 			$state = 'ON';
 		}