projects
/
air-quality
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
die if we don't get data (usb unplug)
[air-quality]
/
pms3003.pl
diff --git
a/pms3003.pl
b/pms3003.pl
index
2d52db8
..
4cb8b14
100755
(executable)
--- a/
pms3003.pl
+++ b/
pms3003.pl
@@
-36,6
+36,7
@@
pm10_r
while (1) {
my ($len, $string) = $s->read(24);
+ die $! if ! defined($len);
if ( $len > 0 ) {
my @v = unpack('n*', $string);
warn "# $len ",dump($string), dump( @v ), $/ if $debug;