From d2197f967aaf4e58ffd9df387c228bf5354c9e0c Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 6 Jan 2015 18:59:59 +0100 Subject: [PATCH] Changed io threshold to 140, fixed boolean error in comparison --- common/lfdemod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lfdemod.c b/common/lfdemod.c index e0d20464..14478319 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -592,14 +592,14 @@ uint32_t bytebits_to_byte(uint8_t* src, int numbits) int IOdemodFSK(uint8_t *dest, size_t size) { - static const uint8_t THRESHOLD = 170; + static const uint8_t THRESHOLD = 140; uint32_t idx=0; //make sure buffer has data if (size < 66) return -1; //test samples are not just noise uint8_t justNoise = 1; for(idx=0;idx< size && justNoise ;idx++){ - justNoise = dest[idx] > THRESHOLD; + justNoise = dest[idx] < THRESHOLD; } if(justNoise) return 0; -- 2.39.2