projects
/
Biblio-RFID.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
read tag after programming and retry programming if needed
[Biblio-RFID.git]
/
scripts
/
scan.pl
diff --git
a/scripts/scan.pl
b/scripts/scan.pl
index
0b59111
..
d2e18b9
100755
(executable)
--- a/
scripts/scan.pl
+++ b/
scripts/scan.pl
@@
-30,7
+30,7
@@
sub tag {
, " AFI: "
, uc unpack('H2', $rfid->afi($tag))
, " "
, " AFI: "
, uc unpack('H2', $rfid->afi($tag))
, " "
- , dump(
Biblio::RFID::RFID501->to_hash( $rfid->blocks($tag)
) )
+ , dump(
$rfid->to_hash( $tag
) )
, $/
;
}
, $/
;
}
@@
-45,7
+45,7
@@
sub iso_date {
sub log_tag {
my $tag = shift;
return if $saved->{tag} or ! $log;
sub log_tag {
my $tag = shift;
return if $saved->{tag} or ! $log;
- my $hash =
Biblio::RFID::RFID501->to_hash( $rfid->blocks($tag)
);
+ my $hash =
$rfid->to_hash( $tag
);
open(my $fh, '>>', $log) || die "$log: $!";
print $fh iso_date,",$tag,", $hash->{content}, "\n";
close($fh);
open(my $fh, '>>', $log) || die "$log: $!";
print $fh iso_date,",$tag,", $hash->{content}, "\n";
close($fh);
@@
-55,7
+55,7
@@
do {
my @visible = $rfid->tags(
enter => sub {
my $tag = shift;
my @visible = $rfid->tags(
enter => sub {
my $tag = shift;
- print iso_date," enter ", tag($tag);
+ print iso_date,"
reader ", $rfid->from_reader($tag), "
enter ", tag($tag);
log_tag $tag;
},
leave => sub {
log_tag $tag;
},
leave => sub {