-
- // skip until samples begin to change
- if (startFound || curSample < firstSample-T55xx_READ_TOL){
- if (!startFound)
- dest[i++] = firstSample;
- startFound = true;
+ // skip until first high samples begin to change
+ if (startFound || curSample < T55xx_READ_UPPER_THRESHOLD-T55xx_READ_TOL){
+ // if just found start - recover last sample
+ if (!startFound) {
+ dest[i++] = lastSample;
+ startFound = true;
+ }
+ // collect samples