Skip to content

Commit

Permalink
Merge branch 'commaai:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasloetkolben authored Oct 9, 2024
2 parents a19155c + c78d9bb commit dc6296c
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 9 deletions.
3 changes: 3 additions & 0 deletions opendbc/car/chrysler/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@
b'68535470AC',
b'68548900AB',
b'68586307AB',
b'68586307AC',
],
(Ecu.fwdRadar, 0x753, None): [
b'04672892AB',
Expand Down Expand Up @@ -545,6 +546,7 @@
b'68378710AL ',
b'68378742AI ',
b'68378742AK ',
b'68378743AI ',
b'68378743AM ',
b'68378748AL ',
b'68378758AM ',
Expand Down Expand Up @@ -598,6 +600,7 @@
b'68360081AM',
b'68360085AJ',
b'68360085AL',
b'68360085AO',
b'68360086AH',
b'68360086AK',
b'68360086AN',
Expand Down
1 change: 1 addition & 0 deletions opendbc/car/honda/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
b'46114-TVA-A080\x00\x00',
b'46114-TVA-A120\x00\x00',
b'46114-TVA-A320\x00\x00',
b'46114-TVA-A410\x00\x00',
b'46114-TVE-H550\x00\x00',
b'46114-TVE-H560\x00\x00',
],
Expand Down
8 changes: 7 additions & 1 deletion opendbc/car/hyundai/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00TL__ FCA F-CUP 1.00 1.01 99110-D3500 ',
b'\xf1\x00TL__ FCA F-CUP 1.00 1.02 99110-D3510 ',
b'\xf1\x00TL__ FCA FHCUP 1.00 1.02 99110-D3500 ',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00TL MFC AT KOR LHD 1.00 1.02 95895-D3800 180719',
b'\xf1\x00TL MFC AT KOR LHD 1.00 1.06 95895-D3800 190107',
b'\xf1\x00TL MFC AT USA LHD 1.00 1.06 95895-D3800 190107',
],
},
Expand Down Expand Up @@ -263,6 +265,7 @@
b'\xf1\x00TM ESC \x02 103"\x07\x08 58910-S2GA0',
b'\xf1\x00TM ESC \x03 101 \x08\x02 58910-S2DA0',
b'\xf1\x00TM ESC \x03 102!\x04\x03 58910-S2DA0',
b'\xf1\x00TM ESC \x03 103"\x07\x06 58910-S2DA0',
b'\xf1\x00TM ESC \x04 101 \x08\x04 58910-S2GA0',
b'\xf1\x00TM ESC \x04 102!\x04\x05 58910-S2GA0',
b'\xf1\x00TM ESC \x04 103"\x07\x08 58910-S2GA0',
Expand Down Expand Up @@ -404,6 +407,7 @@
b'\xf1\x00LX ESC \x0b 103\x19\t\x07 58910-S8330',
b'\xf1\x00LX ESC \x0b 103\x19\t\t 58910-S8350',
b'\xf1\x00LX ESC \x0b 103\x19\t\x10 58910-S8360',
b'\xf1\x00LX ESC \x0b 104 \x10\x13 58910-S8330',
b'\xf1\x00LX ESC \x0b 104 \x10\x16 58910-S8360',
b'\xf1\x00ON ESC \x01 101\x19\t\x08 58910-S9360',
b'\xf1\x00ON ESC \x0b 100\x18\x12\x18 58910-S9360',
Expand Down Expand Up @@ -514,6 +518,7 @@
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00HI LKAS AT USA LHD 1.00 1.00 95895-D2020 160302',
b'\xf1\x00HI LKAS AT USA LHD 1.00 1.00 95895-D2030 170208',
b'\xf1\x00HI LKAS AT USA LHD 1.00 1.01 95895-D2030 170811',
b'\xf1\x00HI MFC AT USA LHD 1.00 1.03 99211-D2000 190831',
],
},
Expand Down Expand Up @@ -1070,10 +1075,10 @@
},
CAR.GENESIS_GV60_EV_1ST_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00JW1 MFC AT AUS RHD 1.00 1.03 99211-CU100 221118',
b'\xf1\x00JW1 MFC AT USA LHD 1.00 1.02 99211-CU000 211215',
b'\xf1\x00JW1 MFC AT USA LHD 1.00 1.02 99211-CU100 211215',
b'\xf1\x00JW1 MFC AT USA LHD 1.00 1.03 99211-CU000 221118',
b'\xf1\x00JW1 MFC AT AUS RHD 1.00 1.03 99211-CU100 221118',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00JW1_ RDR ----- 1.00 1.00 99110-CU000 ',
Expand All @@ -1084,6 +1089,7 @@
b'\xf1\x00MQ4 MFC AT USA LHD 1.00 1.00 99210-R5100 221019',
b'\xf1\x00MQ4 MFC AT USA LHD 1.00 1.03 99210-R5000 200903',
b'\xf1\x00MQ4 MFC AT USA LHD 1.00 1.05 99210-R5000 210623',
b'\xf1\x00MQ4 MFC AT USA LHD 1.00 1.06 99210-R5000 211216',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00MQ4_ SCC F-CUP 1.00 1.06 99110-P2000 ',
Expand Down
4 changes: 2 additions & 2 deletions opendbc/car/tesla/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
b'TeMYG4_DCS_Update_0.0.0 (9),E4014.26.0',
b'TeMYG4_Main_0.0.0 (59),E4H014.29.0',
b'TeMYG4_SingleECU_0.0.0 (33),E4S014.27',
]
],
},
CAR.TESLA_MODEL_Y: {
(Ecu.eps, 0x730, None): [
Expand All @@ -23,6 +23,6 @@
b'TeMYG4_DCS_Update_0.0.0 (13),Y4P002.27.1',
b'TeMYG4_DCS_Update_0.0.0 (9),Y4P002.25.0',
b'TeMYG4_SingleECU_0.0.0 (33),Y4S002.26',
]
],
},
}
1 change: 1 addition & 0 deletions opendbc/car/tests/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ class CarTestRoute(NamedTuple):
CarTestRoute("7e34a988419b5307|2019-12-18--19-13-30", TOYOTA.TOYOTA_RAV4_TSS2), # hybrid
CarTestRoute("2475fb3eb2ffcc2e|2022-04-29--12-46-23", TOYOTA.TOYOTA_RAV4_TSS2_2022), # hybrid
CarTestRoute("20ba9ade056a8c7b|2021-02-08--21-57-35", TOYOTA.TOYOTA_RAV4_PRIME), # SecOC
CarTestRoute("8bfb000e03b2a257/00000004--f9eee5f52e", TOYOTA.TOYOTA_SIENNA_4TH_GEN), # SecOC
CarTestRoute("7a31f030957b9c85|2023-04-01--14-12-51", TOYOTA.LEXUS_ES),
CarTestRoute("37041c500fd30100|2020-12-30--12-17-24", TOYOTA.LEXUS_ES), # hybrid
CarTestRoute("e6a24be49a6cd46e|2019-10-29--10-52-42", TOYOTA.LEXUS_ES_TSS2),
Expand Down
1 change: 1 addition & 0 deletions opendbc/car/torque_data/substitute.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"TOYOTA_ALPHARD_TSS2" = "TOYOTA_SIENNA"
"TOYOTA_PRIUS_V" = "TOYOTA_PRIUS"
"TOYOTA_RAV4_PRIME" = "TOYOTA_RAV4_TSS2"
"TOYOTA_SIENNA_4TH_GEN" = "TOYOTA_RAV4_TSS2"
"LEXUS_IS" = "LEXUS_NX"
"LEXUS_CTH" = "LEXUS_NX"
"LEXUS_ES" = "TOYOTA_CAMRY"
Expand Down
35 changes: 35 additions & 0 deletions opendbc/car/toyota/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
b'\x018966333X0000\x00\x00\x00\x00',
b'\x018966333X4000\x00\x00\x00\x00',
b'\x01896633T16000\x00\x00\x00\x00',
b'\x01896633TA2000\x00\x00\x00\x00',
b'\x028966306B2100\x00\x00\x00\x00897CF3302002\x00\x00\x00\x00',
b'\x028966306B2300\x00\x00\x00\x00897CF3302002\x00\x00\x00\x00',
b'\x028966306B2500\x00\x00\x00\x00897CF3302002\x00\x00\x00\x00',
Expand Down Expand Up @@ -321,6 +322,7 @@
b'F1526F4073\x00\x00\x00\x00\x00\x00',
b'F1526F4121\x00\x00\x00\x00\x00\x00',
b'F1526F4122\x00\x00\x00\x00\x00\x00',
b'F1526F4190\x00\x00\x00\x00\x00\x00',
],
(Ecu.eps, 0x7a1, None): [
b'8965B10011\x00\x00\x00\x00\x00\x00',
Expand All @@ -337,6 +339,7 @@
b'\x033F401200\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203202\x00\x00\x00\x00',
b'\x033F424000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203202\x00\x00\x00\x00',
b'\x033F424000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203302\x00\x00\x00\x00',
b'\x033F435000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203302\x00\x00\x00\x00',
],
(Ecu.fwdRadar, 0x750, 0xf): [
b'8821F0W01000 ',
Expand Down Expand Up @@ -431,6 +434,7 @@
CAR.TOYOTA_COROLLA_TSS2: {
(Ecu.engine, 0x700, None): [
b'\x01896630A22000\x00\x00\x00\x00',
b'\x01896630A42000\x00\x00\x00\x00',
b'\x01896630ZG2000\x00\x00\x00\x00',
b'\x01896630ZG5000\x00\x00\x00\x00',
b'\x01896630ZG5100\x00\x00\x00\x00',
Expand Down Expand Up @@ -525,6 +529,7 @@
b'8965B16011\x00\x00\x00\x00\x00\x00',
b'8965B16101\x00\x00\x00\x00\x00\x00',
b'8965B16170\x00\x00\x00\x00\x00\x00',
b'8965B16260\x00\x00\x00\x00\x00\x00',
b'8965B76012\x00\x00\x00\x00\x00\x00',
b'8965B76050\x00\x00\x00\x00\x00\x00',
b'8965B76091\x00\x00\x00\x00\x00\x00',
Expand All @@ -539,6 +544,7 @@
b'\x01F15260A010\x00\x00\x00\x00\x00\x00',
b'\x01F15260A050\x00\x00\x00\x00\x00\x00',
b'\x01F15260A070\x00\x00\x00\x00\x00\x00',
b'\x01F15260A33000\x00\x00\x00\x00',
b'\x01F152612641\x00\x00\x00\x00\x00\x00',
b'\x01F152612651\x00\x00\x00\x00\x00\x00',
b'\x01F152612862\x00\x00\x00\x00\x00\x00',
Expand Down Expand Up @@ -598,6 +604,7 @@
b'\x028646F1601100\x00\x00\x00\x008646G2601400\x00\x00\x00\x00',
b'\x028646F1601200\x00\x00\x00\x008646G2601400\x00\x00\x00\x00',
b'\x028646F1601300\x00\x00\x00\x008646G2601400\x00\x00\x00\x00',
b'\x028646F1601500\x00\x00\x00\x008646G2601400\x00\x00\x00\x00',
b'\x028646F4203400\x00\x00\x00\x008646G2601200\x00\x00\x00\x00',
b'\x028646F76020C0\x00\x00\x00\x008646G26011A0\x00\x00\x00\x00',
b'\x028646F7603100\x00\x00\x00\x008646G2601200\x00\x00\x00\x00',
Expand Down Expand Up @@ -1010,21 +1017,26 @@
b'\x018966342S7000\x00\x00\x00\x00',
b'\x018966342Z1000\x00\x00\x00\x00',
b'\x018966342Z1100\x00\x00\x00\x00',
b'\x01896634AJ7000\x00\x00\x00\x00',
],
(Ecu.abs, 0x7b0, None): [
b'\x01F15264228300\x00\x00\x00\x00',
b'\x01F15264228500\x00\x00\x00\x00',
b'\x01F15264284100\x00\x00\x00\x00',
b'\x01F152642F3000\x00\x00\x00\x00',
],
(Ecu.eps, 0x7a1, None): [
b'\x018965B4209000\x00\x00\x00\x00',
b'\x018965B4233100\x00\x00\x00\x00',
],
(Ecu.fwdRadar, 0x750, 0xf): [
b'\x018821F3301400\x00\x00\x00\x00',
b'\x018821F6201400\x00\x00\x00\x00',
],
(Ecu.fwdCamera, 0x750, 0x6d): [
b'\x028646F4205200\x00\x00\x00\x008646G4202000\x00\x00\x00\x00',
b'\x028646F4205300\x00\x00\x00\x008646G4202100\x00\x00\x00\x00',
b'\x028646F4210100\x00\x00\x00\x008646G3305000\x00\x00\x00\x00',
],
},
CAR.TOYOTA_RAV4_TSS2: {
Expand Down Expand Up @@ -1248,6 +1260,28 @@
b'8646F0801100\x00\x00\x00\x00',
],
},
CAR.TOYOTA_SIENNA_4TH_GEN: {
(Ecu.engine, 0x700, None): [
b'\x01896630841000\x00\x00\x00\x00',
b'\x01896630857101\x00\x00\x00\x00',
b'\x01896630864000\x00\x00\x00\x00',
],
(Ecu.abs, 0x7b0, None): [
b'\x01F15260815100\x00\x00\x00\x00',
b'\x01F15260815300\x00\x00\x00\x00',
],
(Ecu.eps, 0x7a1, None): [
b'\x018965B4509100\x00\x00\x00\x00',
],
(Ecu.fwdRadar, 0x750, 0xf): [
b'\x018821F3301500\x00\x00\x00\x00',
],
(Ecu.fwdCamera, 0x750, 0x6d): [
b'\x028646F0802200\x00\x00\x00\x008646G4202100\x00\x00\x00\x00',
b'\x028646F0802300\x00\x00\x00\x008646G4202100\x00\x00\x00\x00',
b'\x028646F0802400\x00\x00\x00\x008646G4202100\x00\x00\x00\x00',
],
},
CAR.LEXUS_CTH: {
(Ecu.dsu, 0x791, None): [
b'881517601100\x00\x00\x00\x00',
Expand Down Expand Up @@ -1666,6 +1700,7 @@
b'8965B47070\x00\x00\x00\x00\x00\x00',
],
(Ecu.fwdRadar, 0x750, 0xf): [
b'\x018821F3301300\x00\x00\x00\x00',
b'\x018821F3301400\x00\x00\x00\x00',
],
(Ecu.fwdCamera, 0x750, 0x6d): [
Expand Down
2 changes: 1 addition & 1 deletion opendbc/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime
# https://engage.toyota.com/static/images/toyota_safety_sense/TSS_Applicability_Chart.pdf
stop_and_go = candidate != CAR.TOYOTA_AVALON

elif candidate in (CAR.TOYOTA_RAV4_TSS2, CAR.TOYOTA_RAV4_TSS2_2022, CAR.TOYOTA_RAV4_TSS2_2023, CAR.TOYOTA_RAV4_PRIME):
elif candidate in (CAR.TOYOTA_RAV4_TSS2, CAR.TOYOTA_RAV4_TSS2_2022, CAR.TOYOTA_RAV4_TSS2_2023, CAR.TOYOTA_RAV4_PRIME, CAR.TOYOTA_SIENNA_4TH_GEN):
ret.lateralTuning.init('pid')
ret.lateralTuning.pid.kiBP = [0.0]
ret.lateralTuning.pid.kpBP = [0.0]
Expand Down
10 changes: 9 additions & 1 deletion opendbc/car/toyota/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class CAR(Platforms):
# TODO: Enable this docs entry when it can be suppressed from openpilot CARS.md
# [ToyotaCarDocs("Toyota RAV4 Prime 2021-23", min_enable_speed=MIN_ACC_SPEED)],
[],
CarSpecs(mass=3650. * CV.LB_TO_KG, wheelbase=2.65, steerRatio=16.88, tireStiffnessFactor=0.5533),
CarSpecs(mass=4372. * CV.LB_TO_KG, wheelbase=2.68, steerRatio=16.88, tireStiffnessFactor=0.5533),
dbc_dict('toyota_rav4_prime_generated', 'toyota_tss2_adas'),
flags=ToyotaFlags.TSS2 | ToyotaFlags.NO_STOP_TIMER | ToyotaFlags.NO_DSU | ToyotaFlags.SECOC,
)
Expand All @@ -266,6 +266,14 @@ class CAR(Platforms):
dbc_dict('toyota_tnga_k_pt_generated', 'toyota_adas'),
flags=ToyotaFlags.NO_STOP_TIMER,
)
TOYOTA_SIENNA_4TH_GEN = PlatformConfig(
# TODO: Enable this docs entry when it can be suppressed from openpilot CARS.md
# [ToyotaCarDocs("Toyota Sienna 2021-23", min_enable_speed=MIN_ACC_SPEED)],
[],
CarSpecs(mass=4625. * CV.LB_TO_KG, wheelbase=3.06, steerRatio=17.8, tireStiffnessFactor=0.444),
dbc_dict('toyota_rav4_prime_generated', 'toyota_tss2_adas'),
flags=ToyotaFlags.TSS2 | ToyotaFlags.NO_STOP_TIMER | ToyotaFlags.NO_DSU | ToyotaFlags.SECOC,
)

# Lexus
LEXUS_CTH = PlatformConfig(
Expand Down
6 changes: 5 additions & 1 deletion opendbc/dbc/generator/toyota/_toyota_2017.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ BO_ 643 PRE_COLLISION: 7 DSU

BO_ 705 GAS_PEDAL: 8 XXX
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
SG_ ETQLVSC : 15|16@0- (0.03125,0) [0|0] "Nm" XXX
SG_ ETQREAL : 31|16@0- (0.03125,0) [0|0] "Nm" SCS
SG_ ETQISC : 47|8@0+ (1,-192) [0|0] "Nm" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.5,0) [0|0] "%" DS1,FCM
SG_ CHECKSUM : 63|8@0+ (1,0) [0|0] "" DS1,FCM

BO_ 740 STEERING_LKA: 5 XXX
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
Expand Down
6 changes: 5 additions & 1 deletion opendbc/dbc/toyota_new_mc_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ BO_ 643 PRE_COLLISION: 7 DSU

BO_ 705 GAS_PEDAL: 8 XXX
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
SG_ ETQLVSC : 15|16@0- (0.03125,0) [0|0] "Nm" XXX
SG_ ETQREAL : 31|16@0- (0.03125,0) [0|0] "Nm" SCS
SG_ ETQISC : 47|8@0+ (1,-192) [0|0] "Nm" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.5,0) [0|0] "%" DS1,FCM
SG_ CHECKSUM : 63|8@0+ (1,0) [0|0] "" DS1,FCM

BO_ 740 STEERING_LKA: 5 XXX
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
Expand Down
6 changes: 5 additions & 1 deletion opendbc/dbc/toyota_nodsu_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ BO_ 643 PRE_COLLISION: 7 DSU

BO_ 705 GAS_PEDAL: 8 XXX
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
SG_ ETQLVSC : 15|16@0- (0.03125,0) [0|0] "Nm" XXX
SG_ ETQREAL : 31|16@0- (0.03125,0) [0|0] "Nm" SCS
SG_ ETQISC : 47|8@0+ (1,-192) [0|0] "Nm" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.5,0) [0|0] "%" DS1,FCM
SG_ CHECKSUM : 63|8@0+ (1,0) [0|0] "" DS1,FCM

BO_ 740 STEERING_LKA: 5 XXX
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
Expand Down
6 changes: 5 additions & 1 deletion opendbc/dbc/toyota_tnga_k_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ BO_ 643 PRE_COLLISION: 7 DSU

BO_ 705 GAS_PEDAL: 8 XXX
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
SG_ ETQLVSC : 15|16@0- (0.03125,0) [0|0] "Nm" XXX
SG_ ETQREAL : 31|16@0- (0.03125,0) [0|0] "Nm" SCS
SG_ ETQISC : 47|8@0+ (1,-192) [0|0] "Nm" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.5,0) [0|0] "%" DS1,FCM
SG_ CHECKSUM : 63|8@0+ (1,0) [0|0] "" DS1,FCM

BO_ 740 STEERING_LKA: 5 XXX
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
Expand Down

0 comments on commit dc6296c

Please sign in to comment.