Skip to content

Commit

Permalink
Volkswagen: log FW on non-OBD buses (commaai#31556)
Browse files Browse the repository at this point in the history
* log lots

* update refs

* cmt
  • Loading branch information
sshane authored Feb 23, 2024
1 parent c9c2ab9 commit 72a7f00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
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 @@ -263,7 +263,7 @@ def fake_get_ecu_addrs(*_, timeout):
print(f'get_vin {name} case, query time={self.total_time / self.N} seconds')

def test_fw_query_timing(self):
total_ref_time = {1: 6.05, 2: 6.95}
total_ref_time = {1: 6.5, 2: 7.4}
brand_ref_times = {
1: {
'gm': 0.5,
Expand All @@ -277,7 +277,7 @@ def test_fw_query_timing(self):
'subaru': 0.45,
'tesla': 0.2,
'toyota': 1.6,
'volkswagen': 0.2,
'volkswagen': 0.65,
},
2: {
'ford': 0.3,
Expand Down
15 changes: 11 additions & 4 deletions selfdrive/car/volkswagen/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,24 @@ def init_make(self, CP: car.CarParams):
VOLKSWAGEN_RX_OFFSET = 0x6a

FW_QUERY_CONFIG = FwQueryConfig(
requests=[
# TODO: add back whitelists after we gather enough data
requests=[request for bus, obd_multiplexing in [(1, True), (1, False), (0, False)] for request in [
Request(
[VOLKSWAGEN_VERSION_REQUEST_MULTI],
[VOLKSWAGEN_VERSION_RESPONSE],
whitelist_ecus=[Ecu.srs, Ecu.eps, Ecu.fwdRadar],
# whitelist_ecus=[Ecu.srs, Ecu.eps, Ecu.fwdRadar],
rx_offset=VOLKSWAGEN_RX_OFFSET,
bus=bus,
logging=(bus != 1 or not obd_multiplexing),
obd_multiplexing=obd_multiplexing,
),
Request(
[VOLKSWAGEN_VERSION_REQUEST_MULTI],
[VOLKSWAGEN_VERSION_RESPONSE],
whitelist_ecus=[Ecu.engine, Ecu.transmission],
# whitelist_ecus=[Ecu.engine, Ecu.transmission],
bus=bus,
logging=(bus != 1 or not obd_multiplexing),
obd_multiplexing=obd_multiplexing,
),
],
]],
)

0 comments on commit 72a7f00

Please sign in to comment.