Hyundai: blacklist bad camera FW (#28318)
* cmt * common parts * add code and date * Revert "add code and date" This reverts commit 47f9ac84cae8d1e73dc2b5af7d5701adc83da6eb. * Revert "common parts" This reverts commit aa5683bbce5b5e8e8414f5b90df9add3998e98ab. * add back to santa cruz * todo * part number test * pass test * Update selfdrive/car/hyundai/tests/test_hyundai.py old-commit-hash: 398dd771144fab835ebab4feebb4461f759bd07f
This commit is contained in:
@@ -52,6 +52,20 @@ class TestHyundaiFingerprint(unittest.TestCase):
|
||||
self.assertEqual(len(ecus_not_in_whitelist), 0,
|
||||
f"{car_model}: Car model has ECUs not in auxiliary request whitelists: {ecu_strings}")
|
||||
|
||||
def test_blacklisted_parts(self):
|
||||
# Asserts no ECUs known to be shared across platforms exist in the database.
|
||||
# Tucson having Santa Cruz camera and EPS for example
|
||||
for car_model, ecus in FW_VERSIONS.items():
|
||||
with self.subTest(car_model=car_model):
|
||||
if car_model == CAR.SANTA_CRUZ_1ST_GEN:
|
||||
raise unittest.SkipTest("Skip checking Santa Cruz for its parts")
|
||||
|
||||
for code, _ in get_platform_codes(ecus[(Ecu.fwdCamera, 0x7c4, None)]):
|
||||
if b"-" not in code:
|
||||
continue
|
||||
part = code.split(b"-")[1]
|
||||
self.assertFalse(part.startswith(b'CW'), "Car has bad part number")
|
||||
|
||||
# Tests for platform codes, part numbers, and FW dates which Hyundai will use to fuzzy
|
||||
# fingerprint in the absence of full FW matches:
|
||||
def test_platform_code_ecus_available(self):
|
||||
|
||||
@@ -1766,7 +1766,6 @@ FW_VERSIONS = {
|
||||
(Ecu.fwdCamera, 0x7c4, None): [
|
||||
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N9210 14G',
|
||||
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.01 99211-N9240 14T',
|
||||
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-CW010 14X',
|
||||
],
|
||||
(Ecu.fwdRadar, 0x7d0, None): [
|
||||
b'\xf1\x00NX4__ 1.00 1.00 99110-N9100 ',
|
||||
|
||||
Reference in New Issue
Block a user