projects
/
air-quality
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80cbace
)
don't send 0 values
master
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 10 Mar 2024 13:14:51 +0000
(14:14 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 10 Mar 2024 13:14:51 +0000
(14:14 +0100)
zph02.pl
patch
|
blob
|
history
diff --git
a/zph02.pl
b/zph02.pl
index
731a432
..
10f961e
100755
(executable)
--- a/
zph02.pl
+++ b/
zph02.pl
@@
-43,7
+43,7
@@
while (1) {
my $checksum = $v[8];
my $pcnt = $v[3] + ( $v[4] / 100 );
- if ( $v[0] == 0xff && $sum == $checksum ) {
+ if ( $v[0] == 0xff && $sum == $checksum
&& $pcnt > 0
) {
my $influx = "zph02,dc=trnjanska pm25_pcnt=$pcnt $t";
print "$influx\n" if -e '/dev/shm/air-debug';
system "curl --max-time 2 --silent -XPOST '$influx_url' --data-binary '$influx'";