X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/fac69c3d76b04088c337365ee124f8db4c13a2f0..62a38cc8835cc7b98a30ee3e670e6eb582ddd8cd:/common/lfdemod.c diff --git a/common/lfdemod.c b/common/lfdemod.c index f5fee22a..12511208 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -1759,6 +1759,10 @@ bool DetectST(uint8_t buffer[], size_t *size, int *foundclock) { for(i=0; i < clk/2-tol; ++i) { buffer[dataloc+i] = high+5; } + } //test for single sample outlier (high between two lows) in the case of very strong waves + if (buffer[dataloc] >= high && buffer[dataloc+2] <= low) { + buffer[dataloc] = buffer[dataloc+2]; + buffer[dataloc+1] = buffer[dataloc+2]; } for (i=0; i