From: Timo Kokkonen Date: Thu, 26 Jan 2017 18:36:32 +0000 (+0200) Subject: onewire_parser: Increase glitch detection retry count to 4 X-Git-Url: http://git.itanic.dy.fi/?p=rrdd;a=commitdiff_plain;h=a12b785bb7b853742c1dc4e31afc6623e49ca1aa onewire_parser: Increase glitch detection retry count to 4 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 --- diff --git a/onewire_parser.c b/onewire_parser.c index 7df7aa1..937400b 100644 --- a/onewire_parser.c +++ b/onewire_parser.c @@ -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);