Skip to content

Commit

Permalink
Subaru: non-obd FW queries logging (commaai#30552)
Browse files Browse the repository at this point in the history
* add subaru logging fw

* whitelist + comma

* whitelist is empty for the other requests

* all whitelisted
  • Loading branch information
jnewb1 authored Nov 30, 2023
1 parent 44ef143 commit a2bb41e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions selfdrive/car/subaru/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,30 @@ def init_make(self, CP: car.CarParams):
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,
),
],
)
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/car/tests/test_fw_fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def test_startup_timing(self):

@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,
Expand All @@ -237,7 +237,7 @@ def test_fw_query_timing(self):
'hyundai': 0.72,
'mazda': 0.2,
'nissan': 0.4,
'subaru': 0.2,
'subaru': 0.4,
'tesla': 0.2,
'toyota': 1.6,
'volkswagen': 0.2,
Expand Down

0 comments on commit a2bb41e

Please sign in to comment.