Audio-Radio-XM-PCR
view release on metacpan or search on metacpan
lib/Audio/Radio/XM/PCR.pm view on Meta::CPAN
my $current_channel = $self->{'current_channel'};
$self->{'full_refresh'}->{'completed'} = 0;
# clear the flags
foreach my $channel (keys %{$self->{'channels'}}) {
if ($channel != $current_channel) {
$self->{'channels'}->{$channel}->{'last_update'} = 0;
}
}
# Iterate - We're out of sync so make a guess
my $last_channel = 1;
while ($self->{'full_refresh'}->{'completed'} == 0) {
for (my $channel = 1; $channel < 256; $channel++) {
next if $channel == $current_channel;
next if !defined $self->{'channels'}->{$channel};
next if $self->{'channels'}->{$channel}->{'last_update'} == 0;
$last_channel = $channel;
}
$self->command('next_channel_info', $last_channel);
$self->_monitor;
( run in 0.673 second using v1.01-cache-2.11-cpan-702932259ff )