From bdd778592daf8e0fd393418bca0af996ae5ab0d5 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 28 Jun 2023 22:32:59 -0700 Subject: [PATCH] Toyota: add documentation about KWP queries (#28739) * bump cereal * more queries (to see the new time) * fix * not sure what i want this to do yet not sure what i want this to do yet * no body * no body * add test * spacing * bodyless * add documentation * cmt * cmt * 1a * oof * just the comments * revert * ? --- selfdrive/car/toyota/values.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index c20699863e..342bf519b6 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -223,6 +223,9 @@ STATIC_DSU_MSGS = [ (0x4CB, (CAR.PRIUS, CAR.RAV4H, CAR.LEXUS_RXH, CAR.LEXUS_NXH, CAR.LEXUS_NX, CAR.RAV4, CAR.COROLLA, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.AVALON, CAR.SIENNA, CAR.LEXUS_CTH, CAR.LEXUS_ES, CAR.LEXUS_ESH, CAR.LEXUS_RX, CAR.PRIUS_V), 0, 100, b'\x0c\x00\x00\x00\x00\x00\x00\x00'), ] +# Some ECUs that use KWP2000 have their FW versions on non-standard data identifiers. +# Toyota diagnostic software first gets the supported data ids, then queries them one by one. +# For example, sends: 0x1a8800, receives: 0x1a8800010203, queries: 0x1a8801, 0x1a8802, 0x1a8803 TOYOTA_VERSION_REQUEST_KWP = b'\x1a\x88\x01' TOYOTA_VERSION_RESPONSE_KWP = b'\x5a\x88\x01' @@ -263,9 +266,11 @@ FW_QUERY_CONFIG = FwQueryConfig( # - HV Battery (0x713, 0x747) # - Motor Generator (0x716, 0x724) # - 2nd ABS "Brake/EPB" (0x730) - # Responds to KWP: + # Responds to KWP (0x1a8801): # - Steering Angle Sensor (0x7b3) # - EPS/EMPS (0x7a0, 0x7a1) + # Responds to KWP (0x1a8881): + # - Body Control Module ((0x750, 0x40)) # Hybrid control computer can be on one of two addresses (Ecu.hybrid, 0x7e2, None), # Hybrid Control Assembly & Computer