use first rfid reader available
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Jul 2010 16:29:45 +0000 (18:29 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Jul 2010 16:30:34 +0000 (18:30 +0200)
scripts/RFID-JSONP-server.pl

index d9ea814..7877fca 100755 (executable)
@@ -23,11 +23,12 @@ my $debug = 1;
 my $listen_port = 9000;                  # pick something not in use
 my $server_url  = "http://localhost:$listen_port";
 
+my $reader = shift @ARGV;
 
 use lib 'lib';
 use RFID::Biblio::RFID501;
-use RFID::Biblio::3M810;
-my $rfid = RFID::Biblio::3M810->new;
+use RFID::Biblio::Readers;
+my $rfid = (RFID::Biblio::Readers->available( $reader ))[0]; # FIXME
 
 my $index_html;
 {