From a2a44f4e4be8e883330fbda31d7f98c4859a6591 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 13 Feb 2020 14:39:33 -0800 Subject: [PATCH] Add CHR FW versions --- selfdrive/car/toyota/values.py | 8 ++++++++ selfdrive/debug/test_fw_query_on_routes.py | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index a0521f122332b3..440bf56c3c7216 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -338,6 +338,14 @@ class CAR: b'8646F0605000 ', ], }, + CAR.CHR: { + (Ecu.dsu, 0x791, None): [b'8821FF404100 '], + (Ecu.esp, 0x7b0, None): [b'F1526F4122\x00\x00\x00\x00\x00\x00'], + (Ecu.eps, 0x7a1, None): [b'8965B10040\x00\x00\x00\x00\x00\x00'], + (Ecu.engine, 0x7e0, None): [b'\x033F424000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203202\x00\x00\x00\x00'], + (Ecu.fwdRadar, 0x750, 0xf): [b'8821FF404100 '], + (Ecu.fwdCamera, 0x750, 0x6d): [b'8646FF404000 '], + }, CAR.COROLLA: { (Ecu.engine, 0x7e0, None): [ b'\x01896630E88000\x00\x00\x00\x00', diff --git a/selfdrive/debug/test_fw_query_on_routes.py b/selfdrive/debug/test_fw_query_on_routes.py index 82bd8299ca1c2e..5bf8c4a76cdf24 100755 --- a/selfdrive/debug/test_fw_query_on_routes.py +++ b/selfdrive/debug/test_fw_query_on_routes.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import os import traceback import sys from tqdm import tqdm @@ -13,14 +14,19 @@ if __name__ == "__main__": if len(sys.argv) < 2: - print("Usage: ./test_fw_query_on_routes.py ") + print("Usage: ./test_fw_query_on_routes.py /") sys.exit(1) + if os.path.exists(sys.argv[1]): + routes = list(open(sys.argv[1])) + else: + routes = [sys.argv[1]] + wrong = 0 good = 0 dongles = [] - for route in tqdm(list(open(sys.argv[1]))): + for route in tqdm(routes): route = route.rstrip() dongle_id, time = route.split('|') qlog_path = f"cd:/{dongle_id}/{time}/0/qlog.bz2"