use new to_hash
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 6 Feb 2014 11:06:30 +0000 (12:06 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 6 Feb 2014 11:06:30 +0000 (12:06 +0100)
This allows code to decode both 15693 and 14443 cards

scripts/RFID-JSONP-server.pl

index b631265..dda08c8 100755 (executable)
@@ -97,7 +97,7 @@ sub http_server {
                                my @tags = $rfid->tags;
                                my $json = { time => time() };
                                foreach my $tag ( @tags ) {
-                                       my $hash = Biblio::RFID::RFID501->to_hash( $rfid->blocks( $tag ) );
+                                       my $hash = $rfid->to_hash( $tag );
                                        $hash->{sid}  = $tag;
                                        $hash->{security} = uc unpack 'H*', $rfid->afi( $tag );
                                        push @{ $json->{tags} }, $hash;