mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
fixed: first bit of em4x50 word was skipped in case of a "0" -> first transition in raw Manchester decoding is now taken into account
This commit is contained in:
parent
62ce1cdf13
commit
4d292d3ca0
1 changed files with 5 additions and 0 deletions
|
@ -1537,6 +1537,11 @@ static uint16_t cleanAskRawDemod(uint8_t *bits, size_t *size, int clk, int inver
|
||||||
getNextHigh(bits, *size, high, &pos);
|
getNextHigh(bits, *size, high, &pos);
|
||||||
// getNextLow(bits, *size, low, &pos);
|
// getNextLow(bits, *size, low, &pos);
|
||||||
|
|
||||||
|
// do not skip first transition
|
||||||
|
if ((pos > cl_2 - cl_4 - 1) && (pos <= clk + cl_4 + 1)) {
|
||||||
|
bits[bitCnt++] = invert ^ 1;
|
||||||
|
}
|
||||||
|
|
||||||
// sample counts, like clock = 32.. it tries to find 32/4 = 8, 32/2 = 16
|
// sample counts, like clock = 32.. it tries to find 32/4 = 8, 32/2 = 16
|
||||||
for (size_t i = pos; i < *size; i++) {
|
for (size_t i = pos; i < *size; i++) {
|
||||||
if (bits[i] >= high && waveHigh) {
|
if (bits[i] >= high && waveHigh) {
|
||||||
|
|
Loading…
Reference in a new issue