--- Plugin.pm.old 2008-10-01 17:25:45.000000000 +0200 +++ Plugin.pm 2008-12-22 10:48:12.000000000 +0100 @@ -1323,6 +1323,7 @@ my $ircode = ""; my $mask = "n"; my $gap = 0; + my $istooshort = 0; # Bug 9611 if( $iBlockIRRepeater{$client} eq 1) { return; @@ -1347,6 +1348,10 @@ for( my $i = 1; $i < (length($data)/2/2); $i++) { # Get high-time $high = unpack( $mask, $data); + + # Bug 9611: ignore pulses with length < 50 + if ( $high < 2 ) { $istooshort = 1; } + # Firmware divides values by 25 to fit into 16 bits # 25 is about the modulation used in IR blasting (1000000 / 38400 = 26.042) $high = $high * 25; @@ -1358,6 +1363,10 @@ # Get low-time $low = unpack( $mask, $data); + + # Bug 9611: ignore pulses with length < 50 + if ( $low < 2 ) { $istooshort = 1; } + # Firmware divides values by 25 to fit into 16 bits # 25 is about the modulation used in IR blasting (1000000 / 38400 = 26.042) $low = $low * 25; @@ -1372,6 +1381,10 @@ } # Get last high-time $high = unpack( $mask, $data); + + # Bug 9611: ignore pulses with length < 50 + if ( $high < 2 ) { $istooshort = 1; } + # Firmware divides values by 25 to fit into 16 bits # 25 is about the modulation used in IR blasting (1000000 / 38400 = 26.042) $high = $high * 25; @@ -1385,7 +1398,12 @@ # This route leads to overlapping, overtaking commands # Slim::Utils::Timers::setTimer( $client, Time::HiRes::time() + 0.1, \&IRBlastSendCallback, (\$ircode)); - &IRBlastSendCallback( $client, \$ircode); + # Bug 9611: ignore pulses with length < 50 + if ( $istooshort ) { + $log->debug( "*** IR-Repeater: Skipping burst with too short pulses\n"); + } else { + &IRBlastSendCallback( $client, \$ircode); + } } # ----------------------------------------------------------------------------