Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions selfdrive/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_WILDLANDER" = "TOYOTA_RAV4_TSS2"
"TOYOTA_SIENNA_4TH_GEN" = "TOYOTA_RAV4_TSS2"
"LEXUS_IS" = "LEXUS_NX"
"LEXUS_CTH" = "LEXUS_NX"
Expand Down
5 changes: 3 additions & 2 deletions selfdrive/car/toyota/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def update(self, cp, cp_cam, CC, frogpilot_toggles):
if self.CP.carFingerprint in (TSS2_CAR - RADAR_ACC_CAR) or (self.CP.flags & ToyotaFlags.SMART_DSU and not self.CP.flags & ToyotaFlags.RADAR_CAN_FILTER):
# distance button is wired to the ACC module (camera or radar)
self.prev_distance_button = self.distance_button
if self.CP.carFingerprint in (SECOC_CAR - RADAR_ACC_CAR):
if self.CP.carFingerprint in (SECOC_CAR - RADAR_ACC_CAR) and self.carFingerprint != CAR.TOYOTA_WILDLANDER:
self.distance_button = cp.vl["PCM_CRUISE_4"]["DISTANCE"]
elif self.CP.carFingerprint in (TSS2_CAR - RADAR_ACC_CAR):
self.distance_button = cp_acc.vl["ACC_CONTROL"]["DISTANCE"]
Expand Down Expand Up @@ -279,8 +279,9 @@ def get_can_parser(CP):
("GEAR_PACKET_HYBRID", 60),
("SECOC_SYNCHRONIZATION", 10),
("GAS_PEDAL", 42),
("PCM_CRUISE_4", 1),
]
if CP.carFingerprint not in RADAR_ACC_CAR and CP.carFingerprint != CAR.TOYOTA_WILDLANDER:
messages.append(("PCM_CRUISE_4", 1))
else:
messages.append(("VSC1S07", 20))
if CP.carFingerprint not in [CAR.TOYOTA_MIRAI]:
Expand Down
17 changes: 17 additions & 0 deletions selfdrive/car/toyota/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,23 @@
b'\x028646F4210100\x00\x00\x00\x008646G3305000\x00\x00\x00\x00',
],
},
CAR.TOYOTA_WILDLANDER: {
(Ecu.engine, 0x700, None): [
b'\x01896630R57001\x00\x00\x00\x00'
],
(Ecu.abs, 0x7b0, None): [
b'\x01F152642C4000\x00\x00\x00\x00'
],
(Ecu.eps, 0x7a1, None): [
b'\x018965B4221000\x00\x00\x00\x00'
],
(Ecu.fwdCamera, 0x750, 0x6d): [
b'\x028646F0R01000\x00\x00\x00\x008646G4202000\x00\x00\x00\x00'
],
(Ecu.fwdRadar, 0x750, 0xf): [
b'\x018821F3301400\x00\x00\x00\x00'
],
},
CAR.TOYOTA_RAV4_TSS2: {
(Ecu.engine, 0x700, None): [
b'\x01896630R58000\x00\x00\x00\x00',
Expand Down
4 changes: 4 additions & 0 deletions selfdrive/car/toyota/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ class CAR(Platforms):
[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),
)
TOYOTA_WILDLANDER = ToyotaSecOCPlatformConfig(
[ToyotaCarDocs("Toyota Wildlander PHEV 2021", min_enable_speed=MIN_ACC_SPEED)],
CarSpecs(mass=4155. * CV.LB_TO_KG, wheelbase=2.69, steerRatio=16.88, tireStiffnessFactor=0.5533),
)

# Lexus
LEXUS_CTH = PlatformConfig(
Expand Down
Loading