diff --git a/docs/CARS.md b/docs/CARS.md index 803cd32e..b3be58c4 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -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)| diff --git a/opendbc/car/tesla/interface.py b/opendbc/car/tesla/interface.py index c485e433..fa29e92b 100644 --- a/opendbc/car/tesla/interface.py +++ b/opendbc/car/tesla/interface.py @@ -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 diff --git a/opendbc/car/tesla/values.py b/opendbc/car/tesla/values.py index 753879ad..48484ec4 100644 --- a/opendbc/car/tesla/values.py +++ b/opendbc/car/tesla/values.py @@ -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), ) diff --git a/opendbc/sunnypilot/car/car_list.json b/opendbc/sunnypilot/car/car_list.json index 6fce8e70..f065b96a 100644 --- a/opendbc/sunnypilot/car/car_list.json +++ b/opendbc/sunnypilot/car/car_list.json @@ -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",