Explorar el Código

Rename TV to PLEX.
Lowercase everything

Zachary Kotlarek hace 10 años
padre
commit
7e0b548521
Se han modificado 3 ficheros con 15 adiciones y 14 borrados
  1. 1 1
      dmx/amplifierPower.pl
  2. 13 12
      dmx/announce.pl
  3. 1 1
      serial/serial.pl

+ 1 - 1
dmx/amplifierPower.pl

@@ -99,7 +99,7 @@ while (1) {
 	# Set the input as needed
 	# Set the input as needed
 	my $inputCmd = undef();
 	my $inputCmd = undef();
 	{
 	{
-		my $input = 'TV';
+		my $input = 'PLEX';
 		if ($exists{'GAME'}) {
 		if ($exists{'GAME'}) {
 			$input = 'GAME';
 			$input = 'GAME';
 		}
 		}

+ 13 - 12
dmx/announce.pl

@@ -88,7 +88,7 @@ while (1) {
 				$mode = 'UP';
 				$mode = 'UP';
 			}
 			}
 
 
-			DMX::say('Lights ' . $mode);
+			DMX::say('Lights ' . lc($mode));
 		}
 		}
 	}
 	}
 
 
@@ -96,41 +96,42 @@ while (1) {
 	if (exists($exists{'AMPLIFIER_INPUT'}) && exists($last{'AMPLIFIER_INPUT'}) &&
 	if (exists($exists{'AMPLIFIER_INPUT'}) && exists($last{'AMPLIFIER_INPUT'}) &&
 		$exists{'AMPLIFIER_INPUT'} ne $last{'AMPLIFIER_INPUT'}) {
 		$exists{'AMPLIFIER_INPUT'} ne $last{'AMPLIFIER_INPUT'}) {
 			if ($now - $modeLast > $MODE_DELAY) {
 			if ($now - $modeLast > $MODE_DELAY) {
-				DMX::say('Amplifier input: ' . $exists{'AMPLIFIER_INPUT'});
+				DMX::say('Amplifier input: ' . lc($exists{'AMPLIFIER_INPUT'}));
 			}
 			}
 	}
 	}
 
 
 	# Speak when AMPLIFIER_MODE changes
 	# Speak when AMPLIFIER_MODE changes
 	if (exists($exists{'AMPLIFIER_MODE'}) && exists($last{'AMPLIFIER_MODE'}) &&
 	if (exists($exists{'AMPLIFIER_MODE'}) && exists($last{'AMPLIFIER_MODE'}) &&
 		$exists{'AMPLIFIER_MODE'} ne $last{'AMPLIFIER_MODE'}) {
 		$exists{'AMPLIFIER_MODE'} ne $last{'AMPLIFIER_MODE'}) {
-			DMX::say('Amplifier mode: ' . $exists{'AMPLIFIER_MODE'});
+			DMX::say('Amplifier mode: ' . lc($exists{'AMPLIFIER_MODE'}));
 	}
 	}
 
 
 	# Speak when BRIGHT changes
 	# Speak when BRIGHT changes
 	if (exists($exists{'BRIGHT'}) && exists($last{'BRIGHT'}) && $exists{'BRIGHT'} ne $last{'BRIGHT'}) {
 	if (exists($exists{'BRIGHT'}) && exists($last{'BRIGHT'}) && $exists{'BRIGHT'} ne $last{'BRIGHT'}) {
+		my $mode = 'NOMINAL';
 		if ($exists{'BRIGHT'}) {
 		if ($exists{'BRIGHT'}) {
-			DMX::say('Lights - Full power');
-		} else {
-			DMX::say('Lights - Nominal power');
+			$mode = 'FULL';
 		}
 		}
+		DMX::say('Lights - ' . lc($mode) . ' power');
 	}
 	}
 
 
 	# Speak when NO_MOTION changes
 	# Speak when NO_MOTION changes
 	if (exists($exists{'NO_MOTION'}) && exists($last{'NO_MOTION'}) && $exists{'NO_MOTION'} ne $last{'NO_MOTION'}) {
 	if (exists($exists{'NO_MOTION'}) && exists($last{'NO_MOTION'}) && $exists{'NO_MOTION'} ne $last{'NO_MOTION'}) {
+		my $mode = 'ENABLED';
 		if ($exists{'NO_MOTION'}) {
 		if ($exists{'NO_MOTION'}) {
-			DMX::say('Motion detectors: Disabled');
-		} else {
-			DMX::say('Motion detectors: Enabled');
+			$mode = 'DISABLED';
 		}
 		}
+		DMX::say('Motion detectors: ' . lc($mode));
 	}
 	}
 
 
 	# Speak when LOCK changes
 	# Speak when LOCK changes
 	if (exists($exists{'LOCK'}) && exists($last{'LOCK'}) && $exists{'LOCK'} ne $last{'LOCK'}) {
 	if (exists($exists{'LOCK'}) && exists($last{'LOCK'}) && $exists{'LOCK'} ne $last{'LOCK'}) {
+		my $mode = 'UNLOCKED';
 		if ($exists{'LOCK'}) {
 		if ($exists{'LOCK'}) {
-			DMX::say('System locked');
-		} else {
-			DMX::say('System unlocked');
+			$mode = 'LOCKED';
 		}
 		}
+
+		DMX::say('System ' . lc($mode));
 	}
 	}
 
 
 	# Email when ALARM is asserted
 	# Email when ALARM is asserted

+ 1 - 1
serial/serial.pl

@@ -72,7 +72,7 @@ if (basename($0) =~ /PROJECTOR/i) {
 		'MUTE'         => 'MUON',
 		'MUTE'         => 'MUON',
 		'UNMUTE'       => 'MUOFF',
 		'UNMUTE'       => 'MUOFF',
 		'INPUT'        => 'SI?',
 		'INPUT'        => 'SI?',
-		'TV'           => 'SITV',
+		'PLEX'         => 'SITV',
 		'GAME'         => 'SIDVD',
 		'GAME'         => 'SIDVD',
 		'MODE'         => 'MS?',
 		'MODE'         => 'MS?',
 		'SURROUND'     => 'MSDOLBY DIGITAL',
 		'SURROUND'     => 'MSDOLBY DIGITAL',