mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
14b: safer handling of corrupted signals
This commit is contained in:
parent
f56cbc82f5
commit
b1c1433e45
1 changed files with 10 additions and 0 deletions
|
@ -893,6 +893,16 @@ static RAMFUNC int Handle14443bSamplesFromTag(int ci, int cq) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (AMPLITUDE(ci, cq) < SUBCARRIER_DETECT_THRESHOLD) {
|
||||||
|
LED_C_OFF();
|
||||||
|
// subcarrier lost
|
||||||
|
Demod.state = DEMOD_UNSYNCD;
|
||||||
|
if (Demod.len > 0) { // no EOF but no signal anymore and we got data, e.g. ASK CTx
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// we have still signal but no proper byte or EOF? this shouldn't happen
|
||||||
|
Demod.state = WAIT_FOR_RISING_EDGE_OF_SOF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Demod.posCount = 0;
|
Demod.posCount = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue