Subaru: non-obd FW queries logging (#30552)

* add subaru logging fw

* whitelist + comma

* whitelist is empty for the other requests

* all whitelisted
pull/30560/head
Justin Newberry 1 year ago committed by GitHub
parent 44ef143ae7
commit a2bb41e0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      selfdrive/car/subaru/values.py
  2. 4
      selfdrive/car/tests/test_fw_fingerprint.py

@ -141,12 +141,30 @@ FW_QUERY_CONFIG = FwQueryConfig(
Request(
[StdQueries.TESTER_PRESENT_REQUEST, SUBARU_VERSION_REQUEST],
[StdQueries.TESTER_PRESENT_RESPONSE, SUBARU_VERSION_RESPONSE],
whitelist_ecus=[Ecu.abs, Ecu.eps, Ecu.fwdCamera, Ecu.engine, Ecu.transmission],
),
# Some Eyesight modules fail on TESTER_PRESENT_REQUEST
# TODO: check if this resolves the fingerprinting issue for the 2023 Ascent and other new Subaru cars
Request(
[SUBARU_VERSION_REQUEST],
[SUBARU_VERSION_RESPONSE],
whitelist_ecus=[Ecu.fwdCamera],
),
# Non-OBD requests
Request(
[StdQueries.TESTER_PRESENT_REQUEST, SUBARU_VERSION_REQUEST],
[StdQueries.TESTER_PRESENT_RESPONSE, SUBARU_VERSION_RESPONSE],
whitelist_ecus=[Ecu.abs, Ecu.eps, Ecu.fwdCamera, Ecu.engine, Ecu.transmission],
bus=0,
logging=True,
),
Request(
[StdQueries.TESTER_PRESENT_REQUEST, SUBARU_VERSION_REQUEST],
[StdQueries.TESTER_PRESENT_RESPONSE, SUBARU_VERSION_RESPONSE],
whitelist_ecus=[Ecu.abs, Ecu.eps, Ecu.fwdCamera, Ecu.engine, Ecu.transmission],
bus=1,
logging=True,
obd_multiplexing=False,
),
],
)

@ -227,7 +227,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
@pytest.mark.timeout(60)
def test_fw_query_timing(self):
total_ref_time = 6.07
total_ref_time = 6.27
brand_ref_times = {
1: {
'body': 0.11,
@ -237,7 +237,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
'hyundai': 0.72,
'mazda': 0.2,
'nissan': 0.4,
'subaru': 0.2,
'subaru': 0.4,
'tesla': 0.2,
'toyota': 1.6,
'volkswagen': 0.2,

Loading…
Cancel
Save