mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-07 13:41:18 -07:00
fix STT bug for strong waves (or cleaned ones)
This commit is contained in:
parent
40c6a02bc9
commit
dda5a928f0
1 changed files with 4 additions and 0 deletions
|
@ -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<datalen; ++i) {
|
||||
if (i+newloc < bufsize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue