From f01651d4405efa421aea1ae0dff8b0ad0e24f402 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 23 Jan 2024 23:12:48 -0800 Subject: [PATCH] Nissan: log FW responses on bus 0 (#31138) * nissan: log FW responses on bus 0 * update refs old-commit-hash: b9ad854451ce642a05c487d96a1a9bc2181bb3ba --- selfdrive/car/nissan/values.py | 12 ++++++++++-- selfdrive/car/tests/test_fw_fingerprint.py | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/nissan/values.py b/selfdrive/car/nissan/values.py index 4ee23c32c3..c013b2056f 100644 --- a/selfdrive/car/nissan/values.py +++ b/selfdrive/car/nissan/values.py @@ -59,27 +59,35 @@ NISSAN_VERSION_RESPONSE_KWP = b'\x61\x83' NISSAN_RX_OFFSET = 0x20 FW_QUERY_CONFIG = FwQueryConfig( - requests=[ + requests=[request for bus, logging in ((0, True), (1, False)) for request in [ Request( [NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP], [NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP], + bus=bus, + logging=logging, ), Request( [NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP], [NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP], rx_offset=NISSAN_RX_OFFSET, + bus=bus, + logging=logging, ), # Rogue's engine solely responds to this Request( [NISSAN_DIAGNOSTIC_REQUEST_KWP_2, NISSAN_VERSION_REQUEST_KWP], [NISSAN_DIAGNOSTIC_RESPONSE_KWP_2, NISSAN_VERSION_RESPONSE_KWP], + bus=bus, + logging=logging, ), Request( [StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST], [StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE], rx_offset=NISSAN_RX_OFFSET, + bus=bus, + logging=logging, ), - ], + ]], ) DBC = { diff --git a/selfdrive/car/tests/test_fw_fingerprint.py b/selfdrive/car/tests/test_fw_fingerprint.py index 36619f4cde..893c79c797 100755 --- a/selfdrive/car/tests/test_fw_fingerprint.py +++ b/selfdrive/car/tests/test_fw_fingerprint.py @@ -238,7 +238,7 @@ class TestFwFingerprintTiming(unittest.TestCase): @pytest.mark.timeout(60) def test_fw_query_timing(self): - total_ref_time = 6.1 + total_ref_time = 6.5 brand_ref_times = { 1: { 'body': 0.1, @@ -247,7 +247,7 @@ class TestFwFingerprintTiming(unittest.TestCase): 'honda': 0.45, 'hyundai': 0.65, 'mazda': 0.2, - 'nissan': 0.4, + 'nissan': 0.8, 'subaru': 0.45, 'tesla': 0.2, 'toyota': 1.6,