From 7d43fbae7ffcf9951c7f4b12eb0421133264266e Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 28 Feb 2025 15:55:50 -0800 Subject: [PATCH] debug_fw_fingerprinting_offline: add rxoffset --- selfdrive/debug/debug_fw_fingerprinting_offline.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/selfdrive/debug/debug_fw_fingerprinting_offline.py b/selfdrive/debug/debug_fw_fingerprinting_offline.py index 50a3751aa6..8539cca8f0 100755 --- a/selfdrive/debug/debug_fw_fingerprinting_offline.py +++ b/selfdrive/debug/debug_fw_fingerprinting_offline.py @@ -6,7 +6,7 @@ from openpilot.tools.lib.live_logreader import live_logreader from openpilot.tools.lib.logreader import LogReader, ReadMode -def main(route: str | None, addrs: list[int]): +def main(route: str | None, addrs: list[int], rxoffset: int): """ TODO: - highlight TX vs RX clearly @@ -23,7 +23,7 @@ def main(route: str | None, addrs: list[int]): prev_mono_time = 0 # include rx addresses - addrs = addrs + [uds.get_rx_addr_for_tx_addr(addr) for addr in addrs] + addrs = addrs + [uds.get_rx_addr_for_tx_addr(addr, rxoffset) for addr in addrs] for msg in lr: if msg.which() == 'can': @@ -44,7 +44,9 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='View back and forth ISO-TP communication between various ECUs given an address') parser.add_argument('route', nargs='?', help='Route name, live if not specified') parser.add_argument('--addrs', nargs='*', default=[], help='List of tx address to view (0x7e0 for engine)') + parser.add_argument('--rxoffset', default='') args = parser.parse_args() addrs = [int(addr, base=16) if addr.startswith('0x') else int(addr) for addr in args.addrs] - main(args.route, addrs) + rxoffset = int(args.rxoffset, base=16) if args.rxoffset else None + main(args.route, addrs, rxoffset)