Nissan: log FW responses on bus 0 (#31138)

* nissan: log FW responses on bus 0

* update refs
old-commit-hash: b9ad854451
pull/32199/head
Shane Smiskol 1 year ago committed by GitHub
parent 0d558d02ee
commit f01651d440
  1. 12
      selfdrive/car/nissan/values.py
  2. 4
      selfdrive/car/tests/test_fw_fingerprint.py

@ -59,27 +59,35 @@ NISSAN_VERSION_RESPONSE_KWP = b'\x61\x83'
NISSAN_RX_OFFSET = 0x20 NISSAN_RX_OFFSET = 0x20
FW_QUERY_CONFIG = FwQueryConfig( FW_QUERY_CONFIG = FwQueryConfig(
requests=[ requests=[request for bus, logging in ((0, True), (1, False)) for request in [
Request( Request(
[NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP], [NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP],
[NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP], [NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP],
bus=bus,
logging=logging,
), ),
Request( Request(
[NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP], [NISSAN_DIAGNOSTIC_REQUEST_KWP, NISSAN_VERSION_REQUEST_KWP],
[NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP], [NISSAN_DIAGNOSTIC_RESPONSE_KWP, NISSAN_VERSION_RESPONSE_KWP],
rx_offset=NISSAN_RX_OFFSET, rx_offset=NISSAN_RX_OFFSET,
bus=bus,
logging=logging,
), ),
# Rogue's engine solely responds to this # Rogue's engine solely responds to this
Request( Request(
[NISSAN_DIAGNOSTIC_REQUEST_KWP_2, NISSAN_VERSION_REQUEST_KWP], [NISSAN_DIAGNOSTIC_REQUEST_KWP_2, NISSAN_VERSION_REQUEST_KWP],
[NISSAN_DIAGNOSTIC_RESPONSE_KWP_2, NISSAN_VERSION_RESPONSE_KWP], [NISSAN_DIAGNOSTIC_RESPONSE_KWP_2, NISSAN_VERSION_RESPONSE_KWP],
bus=bus,
logging=logging,
), ),
Request( Request(
[StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST], [StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST],
[StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE], [StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE],
rx_offset=NISSAN_RX_OFFSET, rx_offset=NISSAN_RX_OFFSET,
bus=bus,
logging=logging,
), ),
], ]],
) )
DBC = { DBC = {

@ -238,7 +238,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
@pytest.mark.timeout(60) @pytest.mark.timeout(60)
def test_fw_query_timing(self): def test_fw_query_timing(self):
total_ref_time = 6.1 total_ref_time = 6.5
brand_ref_times = { brand_ref_times = {
1: { 1: {
'body': 0.1, 'body': 0.1,
@ -247,7 +247,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
'honda': 0.45, 'honda': 0.45,
'hyundai': 0.65, 'hyundai': 0.65,
'mazda': 0.2, 'mazda': 0.2,
'nissan': 0.4, 'nissan': 0.8,
'subaru': 0.45, 'subaru': 0.45,
'tesla': 0.2, 'tesla': 0.2,
'toyota': 1.6, 'toyota': 1.6,

Loading…
Cancel
Save