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

* add subaru logging fw

* whitelist + comma

* whitelist is empty for the other requests

* all whitelisted
old-commit-hash: a2bb41e0ec5fd96763e9a01a7116efda059de6e6
This commit is contained in:
Justin Newberry
2023-11-29 17:47:09 -08:00
committed by GitHub
parent afaddc9ef5
commit cc625f1a0c
2 changed files with 20 additions and 2 deletions

View File

@@ -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,
),
],
)

View File

@@ -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,