diff --git a/cereal b/cereal index 1a56b09a0d..0c34b6b3c8 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 1a56b09a0d76a8210157a98aed046147201242f6 +Subproject commit 0c34b6b3c8a092e77c9841ff0b95dbbcd20fa84e diff --git a/selfdrive/car/tests/test_fw_fingerprint.py b/selfdrive/car/tests/test_fw_fingerprint.py index e26b859a89..a74e29d620 100755 --- a/selfdrive/car/tests/test_fw_fingerprint.py +++ b/selfdrive/car/tests/test_fw_fingerprint.py @@ -186,7 +186,7 @@ class TestFwFingerprintTiming(unittest.TestCase): def test_fw_query_timing(self): tol = 0.1 - total_ref_time = 5.2 + total_ref_time = 5.5 brand_ref_times = { 1: { 'body': 0.1, @@ -198,7 +198,7 @@ class TestFwFingerprintTiming(unittest.TestCase): 'nissan': 0.9, 'subaru': 0.1, 'tesla': 0.2, - 'toyota': 0.7, + 'toyota': 1.0, 'volkswagen': 0.2, }, 2: { diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index d53cc8b3b0..aac2429739 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -219,23 +219,24 @@ TOYOTA_VERSION_REQUEST_KWP = b'\x1a\x88\x01' TOYOTA_VERSION_RESPONSE_KWP = b'\x5a\x88\x01' FW_QUERY_CONFIG = FwQueryConfig( + # TODO: look at data to whitelist epb effectively requests=[ Request( [StdQueries.SHORT_TESTER_PRESENT_REQUEST, TOYOTA_VERSION_REQUEST_KWP], [StdQueries.SHORT_TESTER_PRESENT_RESPONSE, TOYOTA_VERSION_RESPONSE_KWP], - whitelist_ecus=[Ecu.fwdCamera, Ecu.fwdRadar, Ecu.dsu, Ecu.abs, Ecu.eps], + whitelist_ecus=[Ecu.fwdCamera, Ecu.fwdRadar, Ecu.dsu, Ecu.abs, Ecu.eps, Ecu.epb], bus=0, ), Request( [StdQueries.SHORT_TESTER_PRESENT_REQUEST, StdQueries.OBD_VERSION_REQUEST], [StdQueries.SHORT_TESTER_PRESENT_RESPONSE, StdQueries.OBD_VERSION_RESPONSE], - whitelist_ecus=[Ecu.engine], + whitelist_ecus=[Ecu.engine, Ecu.epb], bus=0, ), Request( [StdQueries.TESTER_PRESENT_REQUEST, StdQueries.DEFAULT_DIAGNOSTIC_REQUEST, StdQueries.EXTENDED_DIAGNOSTIC_REQUEST, StdQueries.UDS_VERSION_REQUEST], [StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.DEFAULT_DIAGNOSTIC_RESPONSE, StdQueries.EXTENDED_DIAGNOSTIC_RESPONSE, StdQueries.UDS_VERSION_RESPONSE], - whitelist_ecus=[Ecu.engine, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.abs, Ecu.eps], + whitelist_ecus=[Ecu.engine, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.abs, Ecu.eps, Ecu.epb], bus=0, ), ], @@ -244,7 +245,10 @@ FW_QUERY_CONFIG = FwQueryConfig( Ecu.abs: [CAR.RAV4, CAR.COROLLA, CAR.HIGHLANDER, CAR.SIENNA, CAR.LEXUS_IS], # On some models, the engine can show on two different addresses Ecu.engine: [CAR.CAMRY, CAR.COROLLA_TSS2, CAR.CHR, CAR.CHR_TSS2, CAR.LEXUS_IS, CAR.LEXUS_RC], - } + }, + extra_ecus=[ + (Ecu.epb, 0x750, 0x2c), # Electronic Parking Brake + ], ) FW_VERSIONS = {