96 |
warn "WEB >> $path" if $debug; |
warn "WEB >> $path" if $debug; |
97 |
} elsif ( $method =~ m{/scan} ) { |
} elsif ( $method =~ m{/scan} ) { |
98 |
my $tags = scan_for_tags(); |
my $tags = scan_for_tags(); |
99 |
my $json = {}; |
my $json = { time => time() }; |
100 |
map { |
map { |
101 |
my $d = decode_tag($_); |
my $d = decode_tag($_); |
102 |
$d->{sid} = $_; |
$d->{sid} = $_; |
309 |
$visible_tags = {}; |
$visible_tags = {}; |
310 |
|
|
311 |
foreach my $tag ( @tags ) { |
foreach my $tag ( @tags ) { |
312 |
|
$visible_tags->{$tag}++; |
313 |
if ( ! defined $last_visible_tags->{$tag} ) { |
if ( ! defined $last_visible_tags->{$tag} ) { |
314 |
if ( defined $tags_data->{$tag} ) { |
if ( defined $tags_data->{$tag} ) { |
315 |
# meteor( 'in-range', $tag ); |
# meteor( 'in-range', $tag ); |
317 |
meteor( 'read', $tag ); |
meteor( 'read', $tag ); |
318 |
read_tag( $tag ); |
read_tag( $tag ); |
319 |
} |
} |
|
$visible_tags->{$tag}++; |
|
320 |
} else { |
} else { |
321 |
warn "## using cached data for $tag" if $debug; |
warn "## using cached data for $tag" if $debug; |
322 |
} |
} |
657 |
warn "## DISPATCH payload to with rest", dump( $payload, $to, $rest ) if $debug; |
warn "## DISPATCH payload to with rest", dump( $payload, $to, $rest ) if $debug; |
658 |
$dispatch->{ $to }->( $rest ); |
$dispatch->{ $to }->( $rest ); |
659 |
} else { |
} else { |
660 |
print "NO DISPATCH for ",dump( $full ),"\n"; |
print "NO DISPATCH for ",as_hex( $full ),"\n"; |
661 |
} |
} |
662 |
|
|
663 |
return $data; |
return $data; |