]> git.itanic.dy.fi Git - rrdd/commitdiff
onewire_parser: Increase glitch detection retry count to 4
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Thu, 26 Jan 2017 18:36:32 +0000 (20:36 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 29 Jan 2017 14:42:17 +0000 (16:42 +0200)
In order to detect glitches properly, we might need to do more than
two reads, especially on noisy lines. Double the amount of reads we do
so that we have better chance of removing glitches from the data.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
onewire_parser.c

index 7df7aa1afbad411b74622bd49a162a9d79138e57..937400baf6b007acd929e63db0a8d9ba2b03881a 100644 (file)
@@ -298,7 +298,7 @@ undefined:
                        }
 
                        if (might_be_glitch(data, &state[i]) &&
-                               glitches < 2 && retries < 7) {
+                               glitches < 4 && retries < 7) {
                                glitches++;
                                prev_data = data;
                                pr_info("Retrying due to a glitch: %f\n", data);