Tesla: remove TESLA_MODEL_X from dashcamOnly (#258)

* enable tesla mx for SP

* add entry

* remove unused import

* use sp_params to override

* update new fingerprint

* add fingerprint in ext

* update to use community support

* Update opendbc/car/tesla/fingerprints.py

* Apply suggestion from @sunnyhaibin

* Update opendbc/car/tesla/values.py

---------

Co-authored-by: Shengming Yuan <me@theeditorstudio.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
This commit is contained in:
Shengming Yuan
2026-02-04 23:53:50 -05:00
committed by GitHub
parent aa208b4619
commit 10c06c9117
4 changed files with 21 additions and 3 deletions

View File

@@ -313,7 +313,7 @@
|Škoda|Superb 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
|Tesla|Model 3 (with HW3) 2019-23|All|[Upstream](#upstream)|
|Tesla|Model 3 (with HW4) 2024-25|All|[Upstream](#upstream)|
|Tesla|Model X (with HW4) 2024|All|[Dashcam mode](#dashcam)|
|Tesla|Model X (with HW4) 2024|All|[Community](community)|
|Tesla|Model Y (with HW3) 2020-23|All|[Upstream](#upstream)|
|Tesla|Model Y (with HW4) 2024-25|All|[Upstream](#upstream)|
|Toyota|Alphard 2019-20|All|[Upstream](#upstream)|

View File

@@ -60,6 +60,9 @@ class CarInterface(CarInterfaceBase):
stock_cp.enableBsm = True
if candidate == CAR.TESLA_MODEL_X:
stock_cp.dashcamOnly = False
if 0x3DF in fingerprint[1]:
ret.flags |= TeslaFlagsSP.HAS_VEHICLE_BUS.value
ret.safetyParam |= TeslaSafetyFlagsSP.HAS_VEHICLE_BUS

View File

@@ -3,7 +3,7 @@ from enum import Enum, IntFlag
from opendbc.car import ACCELERATION_DUE_TO_GRAVITY, Bus, CarSpecs, DbcDict, PlatformConfig, Platforms
from opendbc.car.lateral import AngleSteeringLimits, ISO_LATERAL_ACCEL
from opendbc.car.structs import CarParams, CarState
from opendbc.car.docs_definitions import CarDocs, CarFootnote, CarHarness, CarParts, Column
from opendbc.car.docs_definitions import CarDocs, CarFootnote, CarHarness, CarParts, Column, SupportType
from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
Ecu = CarParams.Ecu
@@ -34,6 +34,11 @@ class TeslaCarDocsHW4(CarDocs):
car_parts: CarParts = field(default_factory=CarParts.common([CarHarness.tesla_b]))
footnotes: list[Enum] = field(default_factory=lambda: [Footnote.HW_TYPE, Footnote.SETUP])
@dataclass
class TeslaCarHW4ModelSXDocs(TeslaCarDocsHW4):
support_type: SupportType = SupportType.COMMUNITY
support_link: str = "community"
@dataclass
class TeslaPlatformConfig(PlatformConfig):
@@ -59,7 +64,7 @@ class CAR(Platforms):
{Bus.party: 'tesla_model3_party', Bus.radar: 'tesla_radar_continental_generated', Bus.adas: 'tesla_model3_vehicle'},
)
TESLA_MODEL_X = TeslaPlatformConfig(
[TeslaCarDocsHW4("Tesla Model X (with HW4) 2024")],
[TeslaCarHW4ModelSXDocs("Tesla Model X (with HW4) 2024")],
CarSpecs(mass=2495., wheelbase=2.960, steerRatio=12.0),
)

View File

@@ -3150,6 +3150,16 @@
],
"package": "All"
},
"Tesla Model X (with HW4) 2024": {
"platform": "TESLA_MODEL_X",
"make": "Tesla",
"brand": "tesla",
"model": "Model X (with HW4)",
"year": [
"2024"
],
"package": "All"
},
"Tesla Model Y (with HW3) 2020-23": {
"platform": "TESLA_MODEL_Y",
"make": "Tesla",