projects
/
Biblio-RFID.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix write_afi
[Biblio-RFID.git]
/
scripts
/
scan.pl
diff --git
a/scripts/scan.pl
b/scripts/scan.pl
index
dd281a7
..
6580ee1
100755
(executable)
--- a/
scripts/scan.pl
+++ b/
scripts/scan.pl
@@
-7,7
+7,6
@@
use Data::Dump qw(dump);
use Getopt::Long;
use lib 'lib';
use Biblio::RFID::Reader;
use Getopt::Long;
use lib 'lib';
use Biblio::RFID::Reader;
-use Biblio::RFID::RFID501;
my $loop = 0;
my $reader;
my $loop = 0;
my $reader;
@@
-30,7
+29,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
) )
, $/
;
}
, $/
;
}
@@
-44,8
+43,8
@@
sub iso_date {
sub log_tag {
my $tag = shift;
sub log_tag {
my $tag = shift;
- return if $saved->{tag};
- my $hash =
Biblio::RFID::RFID501->to_hash( $rfid->blocks($tag)
);
+ return if $saved->{tag}
or ! $log
;
+ 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);