From 83bb14b7f9ad74ae35238a0aa8943c7eb0980ef0 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 17 Apr 2024 15:38:05 -0700 Subject: [PATCH] debug FW query offline: annotate sendcan/can (#32239) bet old-commit-hash: cb8e336cd771f933c41d6ce4ee5bf055dde94846 --- selfdrive/debug/debug_fw_fingerprinting_offline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/debug/debug_fw_fingerprinting_offline.py b/selfdrive/debug/debug_fw_fingerprinting_offline.py index d521ab2e18..8ae9d6d347 100755 --- a/selfdrive/debug/debug_fw_fingerprinting_offline.py +++ b/selfdrive/debug/debug_fw_fingerprinting_offline.py @@ -13,7 +13,7 @@ def main(route: str, addrs: list[int]): - print as fixed width table, easier to read """ - lr = LogReader(route, default_mode=ReadMode.RLOG) + lr = LogReader(route, default_mode=ReadMode.RLOG, sort_by_time=True) start_mono_time = None prev_mono_time = 0 @@ -32,7 +32,7 @@ def main(route: str, addrs: list[int]): if msg.logMonoTime != prev_mono_time: print() prev_mono_time = msg.logMonoTime - print(f"{msg.logMonoTime} rxaddr={can.address}, bus={can.src}, {round((msg.logMonoTime - start_mono_time) * 1e-6, 2)} ms, " + + print(f"{msg.which():>7}: rxaddr={can.address}, bus={can.src}, {round((msg.logMonoTime - start_mono_time) * 1e-6, 2)} ms, " + f"0x{can.dat.hex()}, {can.dat}, {len(can.dat)=}")