X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2FBiblio%2FRFID%2FReader%2F3M810.pm;fp=lib%2FBiblio%2FRFID%2FReader%2F3M810.pm;h=b5bd26d3af022da7513f66ed7eb515ee631dab7f;hb=1621e8a8c09593b9de3ec28ec35b769be7f85ddb;hp=ad28fec2a62b548f5b17033aeb9576f3db7badba;hpb=48764d1207ef06ad96b937bd2365227f78090109;p=Biblio-RFID.git diff --git a/lib/Biblio/RFID/Reader/3M810.pm b/lib/Biblio/RFID/Reader/3M810.pm index ad28fec..b5bd26d 100644 --- a/lib/Biblio/RFID/Reader/3M810.pm +++ b/lib/Biblio/RFID/Reader/3M810.pm @@ -279,6 +279,16 @@ sub read_afi { return $afi; } +=head2 afi_retry + +This specified how many times will driver try to write afi to tag + + Biblio::RFID::Reader::3M810::afi_retry = 100; + +=cut + +our $afi_retry = 100; + sub write_afi { my $tag = shift; $tag = shift if ref $tag; @@ -298,7 +308,7 @@ retry: die "write_afi got $tag_back expected $tag" if $tag_back ne $tag; warn "# SECURITY ", hex_tag($tag), " AFI: $afi"; } elsif ( $rest = _matched $data => '09 06' ) { - if ( $retry++ <= 30 ) { # FIXME lover this number? + if ( $retry++ <= $afi_retry ) { # warn "ERROR writing AFI $afi to $tag retry $retry\n"; goto retry; }