mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
fix #874 - 14a, mifare, shows bits if a partial byte
This commit is contained in:
parent
730a233149
commit
b941e6aab9
1 changed files with 24 additions and 0 deletions
|
@ -334,6 +334,30 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
// Draw the CRC column
|
// Draw the CRC column
|
||||||
const char *crc = (crcStatus == 0 ? "!crc" : (crcStatus == 1 ? " ok " : " "));
|
const char *crc = (crcStatus == 0 ? "!crc" : (crcStatus == 1 ? " ok " : " "));
|
||||||
|
|
||||||
|
// mark short bytes (less than 8 Bit + Parity)
|
||||||
|
if (protocol == ISO_14443A ||
|
||||||
|
protocol == PROTO_MIFARE ||
|
||||||
|
protocol == THINFILM) {
|
||||||
|
|
||||||
|
// approximated with 128 * (9 * data_len);
|
||||||
|
uint16_t bitime = 1056 + 32;
|
||||||
|
|
||||||
|
if (duration < bitime) {
|
||||||
|
|
||||||
|
uint8_t m = 7;
|
||||||
|
while (m > 0) {
|
||||||
|
bitime -= 128;
|
||||||
|
if ( duration > bitime) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
m--;
|
||||||
|
}
|
||||||
|
line[(data_len-1)/16][((data_len-1)%16) * 4 + 2] = '(';
|
||||||
|
line[(data_len-1)/16][((data_len-1)%16) * 4 + 3] = m + 0x30;
|
||||||
|
line[(data_len-1)/16][((data_len-1)%16) * 4 + 4] = ')';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t previous_end_of_transmission_timestamp = 0;
|
uint32_t previous_end_of_transmission_timestamp = 0;
|
||||||
if (prev_eot) {
|
if (prev_eot) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue