Abort when Manchester goes wrong rather than outputting wrong values
This commit is contained in:
1 parent
52640422f1
commit
d2fb44710f
1 file changed
+4
@@ -1538,6 +1538,10 @@ void ReaderHitag(hitag_function htf, hitag_data *htd) {
|
||||
// Pack the response into a byte array
|
||||
for (size_t i = 5; i < nrzs; i++) {
|
||||
uint8_t bit = nrz_samples[i];
|
||||
if (bit > 1) { // When Manchester detects impossible symbol it writes "7"
|
||||
//Dbprintf("Error in Manchester decoding, abort");
|
||||
break;
|
||||
}
|
||||
rx[rxlen / 8] |= bit << (7 - (rxlen % 8));
|
||||
rxlen++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user