FIX: @marshmellow42 's ST detection fix.

FIX: lfops.c and em4x05 command timings.
This commit is contained in:
iceman1001 2017-02-28 19:20:12 +01:00
commit c24364a8a4
2 changed files with 19 additions and 21 deletions

View file

@ -1845,6 +1845,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) {