mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 10:11:58 +08:00
Merge pull request #1826 from nvx/bugfix/trace_relative_times
Fix `trace list -r` (relative times)
This commit is contained in:
commit
71c5e45f37
2 changed files with 25 additions and 9 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
||||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||||
|
|
||||||
## [unreleased][unreleased]
|
## [unreleased][unreleased]
|
||||||
|
- Fixed `trace list -r` (relative times) not working unless `-u` (microseconds) was specified, and made `--frame` respect `-u` and `-r` options (@nvx)
|
||||||
- Added detection of magic Gen4 GTU (@DidierA)
|
- Added detection of magic Gen4 GTU (@DidierA)
|
||||||
- Added luascript `hf_i2c_plus_2k_utils` - Script for dumping/modifying user memory of sectors 0 and 1 (@flamebarke)
|
- Added luascript `hf_i2c_plus_2k_utils` - Script for dumping/modifying user memory of sectors 0 and 1 (@flamebarke)
|
||||||
- Added `hf mfu esave` - saves emulator memory to mfu dump file (@DidierA)
|
- Added `hf mfu esave` - saves emulator memory to mfu dump file (@DidierA)
|
||||||
|
|
|
@ -815,8 +815,8 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(NORMAL, " %10u | %10u | Tag |%-*s | %s| %s",
|
PrintAndLogEx(NORMAL, " %10u | %10u | Tag |%-*s | %s| %s",
|
||||||
(hdr->timestamp - first_hdr->timestamp),
|
time1,
|
||||||
(end_of_transmission_timestamp - first_hdr->timestamp),
|
time2,
|
||||||
72 + crc_format_string_offset,
|
72 + crc_format_string_offset,
|
||||||
line[j],
|
line[j],
|
||||||
(j == num_lines - 1) ? crc : " ",
|
(j == num_lines - 1) ? crc : " ",
|
||||||
|
@ -838,8 +838,8 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(NORMAL,
|
PrintAndLogEx(NORMAL,
|
||||||
_YELLOW_(" %10u") " | " _YELLOW_("%10u") " | " _YELLOW_("Rdr") " |" _YELLOW_("%-*s")" | " _YELLOW_("%s") "| " _YELLOW_("%s"),
|
_YELLOW_(" %10u") " | " _YELLOW_("%10u") " | " _YELLOW_("Rdr") " |" _YELLOW_("%-*s")" | " _YELLOW_("%s") "| " _YELLOW_("%s"),
|
||||||
(hdr->timestamp - first_hdr->timestamp),
|
time1,
|
||||||
(end_of_transmission_timestamp - first_hdr->timestamp),
|
time2,
|
||||||
72 + crc_format_string_offset,
|
72 + crc_format_string_offset,
|
||||||
line[j],
|
line[j],
|
||||||
(j == num_lines - 1) ? crc : " ",
|
(j == num_lines - 1) ? crc : " ",
|
||||||
|
@ -889,12 +889,27 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
|
|
||||||
tracelog_hdr_t *next_hdr = (tracelog_hdr_t *)(trace + tracepos);
|
tracelog_hdr_t *next_hdr = (tracelog_hdr_t *)(trace + tracepos);
|
||||||
|
|
||||||
|
uint32_t time1 = end_of_transmission_timestamp - first_hdr->timestamp;
|
||||||
|
uint32_t time2 = next_hdr->timestamp - first_hdr->timestamp;
|
||||||
|
if (prev_eot) {
|
||||||
|
time1 = 0;
|
||||||
|
time2 = next_hdr->timestamp - end_of_transmission_timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (use_us) {
|
||||||
|
PrintAndLogEx(NORMAL, " %10.1f | %10.1f | %s |fdt (Frame Delay Time): " _YELLOW_("%.1f"),
|
||||||
|
(float)time1 / 13.56,
|
||||||
|
(float)time2 / 13.56,
|
||||||
|
" ",
|
||||||
|
(float)(next_hdr->timestamp - end_of_transmission_timestamp) / 13.56);
|
||||||
|
} else {
|
||||||
PrintAndLogEx(NORMAL, " %10u | %10u | %s |fdt (Frame Delay Time): " _YELLOW_("%d"),
|
PrintAndLogEx(NORMAL, " %10u | %10u | %s |fdt (Frame Delay Time): " _YELLOW_("%d"),
|
||||||
(end_of_transmission_timestamp - first_hdr->timestamp),
|
time1,
|
||||||
(next_hdr->timestamp - first_hdr->timestamp),
|
time2,
|
||||||
" ",
|
" ",
|
||||||
(next_hdr->timestamp - end_of_transmission_timestamp));
|
(next_hdr->timestamp - end_of_transmission_timestamp));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return tracepos;
|
return tracepos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue