Explorar o código

Ignore bad channels

Zachary Kotlarek %!s(int64=13) %!d(string=hai) anos
pai
achega
6943d21845
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      dmx/DMX.pm

+ 5 - 0
dmx/DMX.pm

@@ -129,6 +129,11 @@ sub dim($) {
 		die('Invalid command for socket: ' . join(', ', keys(%{$args})) . ': ' . join(', ', values(%{$args})) . "\n");
 	}
 
+	# Silently skip invalid channels
+	if ($args->{'channel'} < 0) {
+		return;
+	}
+
 	# Adjust for the color curve (for channels where we have such data)
 	my $value = $args->{'value'};
 	if ($CHANNEL_ADJ{$args->{'channel'}}) {