From 6171b1b6f3199bb1503a46b80a28f87e0adea23f Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 6 Feb 2024 01:57:46 -0600 Subject: [PATCH] Reapply "Ford: don't fingerprint on engine (#31195)" part 2 (#31320) * Reapply "Ford: don't fingerprint on engine (#31195) part 2" This reverts commit 0dccc2ab5776145bc3458d75c7c8b6ad51fff57d. * add comment Co-authored-by: Cameron Clough --------- Co-authored-by: Cameron Clough old-commit-hash: dd6065c33b66e04b0ba79d78f967349a5cec6a67 --- selfdrive/car/ford/values.py | 8 +------- selfdrive/car/tests/test_fw_fingerprint.py | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/selfdrive/car/ford/values.py b/selfdrive/car/ford/values.py index 0faf901fc2..c080e02299 100644 --- a/selfdrive/car/ford/values.py +++ b/selfdrive/car/ford/values.py @@ -111,21 +111,15 @@ FW_QUERY_CONFIG = FwQueryConfig( requests=[ # CAN and CAN FD queries are combined. # FIXME: For CAN FD, ECUs respond with frames larger than 8 bytes on the powertrain bus - # TODO: properly handle auxiliary requests to separate queries and add back whitelists Request( [StdQueries.TESTER_PRESENT_REQUEST, StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST], [StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE], - # whitelist_ecus=[Ecu.engine], - ), - Request( - [StdQueries.TESTER_PRESENT_REQUEST, StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST], - [StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE], - # whitelist_ecus=[Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.shiftByWire], bus=0, auxiliary=True, ), ], extra_ecus=[ + # We are unlikely to get a response from the PCM from behind the gateway (Ecu.engine, 0x7e0, None), (Ecu.shiftByWire, 0x732, None), ], diff --git a/selfdrive/car/tests/test_fw_fingerprint.py b/selfdrive/car/tests/test_fw_fingerprint.py index 9f6a847568..064f2e5651 100755 --- a/selfdrive/car/tests/test_fw_fingerprint.py +++ b/selfdrive/car/tests/test_fw_fingerprint.py @@ -254,13 +254,13 @@ class TestFwFingerprintTiming(unittest.TestCase): @pytest.mark.timeout(60) def test_fw_query_timing(self): - total_ref_time = 7.0 + total_ref_time = 6.8 brand_ref_times = { 1: { 'gm': 0.5, 'body': 0.1, 'chrysler': 0.3, - 'ford': 0.2, + 'ford': 0.1, 'honda': 0.55, 'hyundai': 0.65, 'mazda': 0.1, @@ -271,7 +271,7 @@ class TestFwFingerprintTiming(unittest.TestCase): 'volkswagen': 0.2, }, 2: { - 'ford': 0.3, + 'ford': 0.2, 'hyundai': 1.05, } }