X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/4913be92ac529143d4ba7dffd5f709386c92dca5..62a38cc8835cc7b98a30ee3e670e6eb582ddd8cd:/common/lfdemod.c diff --git a/common/lfdemod.c b/common/lfdemod.c index e1fcbf73..12511208 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -288,6 +288,7 @@ int cleanAskRawDemod(uint8_t *BinStream, size_t *size, int clk, int invert, int } //by marshmellow +//amplify based on ask edge detection void askAmp(uint8_t *BitStream, size_t size) { uint8_t Last = 128; @@ -1758,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