projects
/
Biblio-RFID.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1f7261
)
read length and header (3 bytes) until done
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 27 Jul 2010 20:23:15 +0000
(22:23 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 27 Jul 2010 20:24:00 +0000
(22:24 +0200)
lib/RFID/Serial/3M810.pm
patch
|
blob
|
history
diff --git
a/lib/RFID/Serial/3M810.pm
b/lib/RFID/Serial/3M810.pm
index
41fd380
..
892c20f
100644
(file)
--- a/
lib/RFID/Serial/3M810.pm
+++ b/
lib/RFID/Serial/3M810.pm
@@
-62,9
+62,9
@@
sub cmd {
my $r_len = $port->read(3);
- while (
! $r_len
) {
+ while (
length($r_len) < 3
) {
wait_device;
- $r_len = $port->read(
3
);
+ $r_len = $port->read(
3 - length($r_len)
);
}
wait_device;