]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Changed io threshold to 140, fixed boolean error in comparison
authorMartin Holst Swende <martin@swende.se>
Tue, 6 Jan 2015 17:59:59 +0000 (18:59 +0100)
committerMartin Holst Swende <martin@swende.se>
Tue, 6 Jan 2015 17:59:59 +0000 (18:59 +0100)
common/lfdemod.c

index e0d20464cc4d65973e72bae0b5cf4533f703dbe8..144783198e1684a8be432a5abdcc5f5d296c5147 100644 (file)
@@ -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;
 
Impressum, Datenschutz