Toyota: Wildlander Plug-in Hybrid 2021 support (#165)

This commit is contained in:
Chris Patterson
2025-08-25 11:48:05 -05:00
committed by GitHub
parent aa0aa1b7aa
commit 0cbd234e49
7 changed files with 55 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ non_tested_cars = [
HYUNDAI.KIA_SELTOS_2023_NON_SCC,
HYUNDAI.GENESIS_G70_2021_NON_SCC,
HONDA.HONDA_CLARITY,
TOYOTA.TOYOTA_WILDLANDER,
]

View File

@@ -97,3 +97,4 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"GENESIS_G70_2021_NON_SCC" = "HYUNDAI_SONATA"
"HYUNDAI_BAYON_1ST_GEN_NON_SCC" = "HYUNDAI_SONATA"
"HONDA_CLARITY" = "HONDA_CIVIC"
"TOYOTA_WILDLANDER" = "TOYOTA_RAV4_TSS2"

View File

@@ -2,6 +2,9 @@
from opendbc.car.structs import CarParams
from opendbc.car.toyota.values import CAR
from opendbc.sunnypilot.car.fw_versions_ext import merge_fw_versions
from opendbc.sunnypilot.car.toyota.fingerprints_ext import FW_VERSIONS_EXT
Ecu = CarParams.Ecu
FW_VERSIONS = {
@@ -1859,3 +1862,5 @@ FW_VERSIONS = {
],
},
}
FW_VERSIONS = merge_fw_versions(FW_VERSIONS, FW_VERSIONS_EXT)

View File

@@ -157,6 +157,14 @@ class CarInterface(CarInterfaceBase):
if candidate in UNSUPPORTED_DSU_CAR:
ret.safetyParam |= ToyotaSafetyFlagsSP.UNSUPPORTED_DSU
if candidate in (CAR.TOYOTA_WILDLANDER, ):
stock_cp.lateralTuning.init('pid')
stock_cp.lateralTuning.pid.kiBP = [0.0]
stock_cp.lateralTuning.pid.kpBP = [0.0]
stock_cp.lateralTuning.pid.kpV = [0.6]
stock_cp.lateralTuning.pid.kiV = [0.1]
stock_cp.lateralTuning.pid.kf = 0.00007818594
return ret
@staticmethod

View File

@@ -396,6 +396,12 @@ class CAR(Platforms):
flags=ToyotaFlags.UNSUPPORTED_DSU,
)
# port extensions
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),
)
# (addr, cars, bus, 1/freq*100, vl)
STATIC_DSU_MSGS = [

View File

@@ -3585,6 +3585,16 @@
],
"package": "All"
},
"Toyota Wildlander PHEV 2021": {
"platform": "TOYOTA_WILDLANDER",
"make": "Toyota",
"brand": "toyota",
"model": "Wildlander PHEV",
"year": [
"2021"
],
"package": "All"
},
"Toyota Yaris (Non-US only) 2020, 2023": {
"platform": "TOYOTA_YARIS",
"make": "Toyota",

View File

@@ -0,0 +1,24 @@
from opendbc.car.structs import CarParams
from opendbc.car.toyota.values import CAR
Ecu = CarParams.Ecu
FW_VERSIONS_EXT = {
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',
],
},
}