projects
/
air-quality
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c4ac1b
)
die if we don't get data (usb unplug)
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 29 Sep 2019 09:43:04 +0000
(11:43 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 29 Sep 2019 09:43:04 +0000
(11:43 +0200)
pms3003.pl
patch
|
blob
|
history
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;