From: Martin Holst Swende Date: Tue, 6 Jan 2015 17:59:59 +0000 (+0100) Subject: Changed io threshold to 140, fixed boolean error in comparison X-Git-Tag: v2.0.0-rc1~62^2 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/d2197f967aaf4e58ffd9df387c228bf5354c9e0c?ds=inline;hp=-c Changed io threshold to 140, fixed boolean error in comparison --- d2197f967aaf4e58ffd9df387c228bf5354c9e0c 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;