Toyota FPv2: log telematics ECU (#28613)

* add electronic parking brake ecu

* add

* add to whitelists

* update refs
old-commit-hash: ae0d1635b4
beeps
Shane Smiskol 2 years ago committed by GitHub
parent b3f4985151
commit ae58ed5473
  1. 2
      cereal
  2. 6
      selfdrive/car/tests/test_fw_fingerprint.py
  3. 7
      selfdrive/car/toyota/values.py

@ -1 +1 @@
Subproject commit 0c34b6b3c8a092e77c9841ff0b95dbbcd20fa84e
Subproject commit b06b8e3f66f9f3a645b591c5c0c3a23f34861175

@ -157,7 +157,7 @@ class TestFwFingerprint(unittest.TestCase):
ecu_strings = ", ".join([f'Ecu.{ECU_NAME[ecu]}' for ecu in ecus_not_whitelisted])
self.assertFalse(len(whitelisted_ecus) and len(ecus_not_whitelisted),
f'{brand.title()}: FW query whitelist missing ecus: {ecu_strings}')
f'{brand.title()}: ECUs not in any FW query whitelists: {ecu_strings}')
class TestFwFingerprintTiming(unittest.TestCase):
@ -186,7 +186,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
def test_fw_query_timing(self):
tol = 0.1
total_ref_time = 5.5
total_ref_time = 5.8
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': 1.0,
'toyota': 1.3,
'volkswagen': 0.2,
},
2: {

@ -224,19 +224,19 @@ FW_QUERY_CONFIG = FwQueryConfig(
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, Ecu.epb],
whitelist_ecus=[Ecu.fwdCamera, Ecu.fwdRadar, Ecu.dsu, Ecu.abs, Ecu.eps, Ecu.epb, Ecu.telematics],
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, Ecu.epb],
whitelist_ecus=[Ecu.engine, Ecu.epb, Ecu.telematics],
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, Ecu.epb],
whitelist_ecus=[Ecu.engine, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.abs, Ecu.eps, Ecu.epb, Ecu.telematics],
bus=0,
),
],
@ -248,6 +248,7 @@ FW_QUERY_CONFIG = FwQueryConfig(
},
extra_ecus=[
(Ecu.epb, 0x750, 0x2c), # Electronic Parking Brake
(Ecu.telematics, 0x750, 0xc7),
],
)

Loading…
Cancel
Save