Skip to content

Commit 8e84f7a

Browse files
authored
Merge branch 'master' into odyssey-singapore
2 parents 88c7362 + 89b131e commit 8e84f7a

File tree

21 files changed

+47
-48
lines changed

21 files changed

+47
-48
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ At its most basic, a car port will control the steering on a car. A "complete" c
6767

6868
### Connect to the Car
6969

70-
The first step is to get connected to the car with a comma 3X and a car harness.
70+
The first step is to get connected to the car with a comma four and a car harness.
7171
The car harness gets you connected to two different CAN buses and splits one of those buses to send our own actuation messages.
7272

7373
If you're lucky, a harness compatible with your car will already be designed and sold on comma.ai/shop.
@@ -151,7 +151,7 @@ In addition to the standard bounties, we also offer higher value bounties for mo
151151

152152
## FAQ
153153

154-
***How do I use this?*** A [comma 3X](https://comma.ai/shop/comma-3x) is custom-designed to be the best way to run and develop opendbc and openpilot.
154+
***How do I use this?*** A [comma four](https://comma.ai/shop/comma-four) is custom-designed to be the best way to run and develop opendbc and openpilot.
155155

156156
***Which cars are supported?*** See the [supported cars list](docs/CARS.md).
157157

@@ -179,7 +179,7 @@ In addition to the standard bounties, we also offer higher value bounties for mo
179179
* **[DBC file](https://en.wikipedia.org/wiki/CAN_bus#DBC)**: contains definitions for messages on a CAN bus
180180
* **[openpilot](https://github.com/commaai/openpilot)**: an ADAS system for cars supported by opendbc
181181
* **[comma](https://github.com/commaai)**: the company behind opendbc
182-
* **[comma 3X](https://comma.ai/shop/comma-3x)**: the hardware used to run openpilot
182+
* **[comma four](https://comma.ai/shop/comma-four)**: the hardware used to run openpilot
183183

184184
### More resources
185185

docs/CARS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
|Audi|Q5 2017-24|All|[Not compatible](#flexray)|
3030
|Audi|RS3 2018|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
3131
|Audi|S3 2015-17|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
32-
|Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim without Super Cruise Package|[Upstream](#upstream)|
32+
|Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim, without Super Cruise Package|[Upstream](#upstream)|
3333
|Chevrolet|Bolt EV 2022-23|2LT Trim with Adaptive Cruise Control Package|[Upstream](#upstream)|
3434
|Chevrolet|Equinox 2019-22|Adaptive Cruise Control (ACC)|[Upstream](#upstream)|
3535
|Chevrolet|Silverado 1500 2020-21|Safety Package II|[Upstream](#upstream)|

opendbc/can/dbc.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import re
22
import os
3-
from dataclasses import dataclass
43
from collections.abc import Callable
4+
from dataclasses import dataclass
5+
from functools import cache
56

67
from opendbc import DBC_PATH
78

@@ -73,14 +74,8 @@ class Val:
7374
VAL_SPLIT_RE = re.compile(r'["]+')
7475

7576

76-
@dataclass
77+
@cache
7778
class DBC:
78-
name: str
79-
msgs: dict[int, Msg]
80-
addr_to_msg: dict[int, Msg]
81-
name_to_msg: dict[str, Msg]
82-
vals: list[Val]
83-
8479
def __init__(self, name: str):
8580
dbc_path = name
8681
if not os.path.exists(dbc_path):

opendbc/car/docs_definitions.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,14 @@ def part_type(self):
7272

7373
class Mount(EnumBase):
7474
mount = BasePart("mount")
75-
angled_mount_8_degrees = BasePart("angled mount (8 degrees)")
7675

7776

7877
class Cable(EnumBase):
7978
long_obdc_cable = BasePart("long OBD-C cable (9.5 ft)")
8079
usb_a_2_a_cable = BasePart("USB A-A cable")
8180
usbc_otg_cable = BasePart("USB C OTG cable")
8281
usbc_coupler = BasePart("USB-C coupler")
83-
obd_c_cable_1_5ft = BasePart("OBD-C cable (1.5 ft)")
84-
right_angle_obd_c_cable_1_5ft = BasePart("right angle OBD-C cable (1.5 ft)")
82+
obd_c_cable_2ft = BasePart("OBD-C cable (2 ft)")
8583

8684

8785
class Accessory(EnumBase):
@@ -149,9 +147,7 @@ class CarHarness(EnumBase):
149147

150148

151149
class Device(EnumBase):
152-
threex = BasePart("comma 3X", parts=[Mount.mount, Cable.right_angle_obd_c_cable_1_5ft])
153-
# variant of comma 3X with angled mounts
154-
threex_angled_mount = BasePart("comma 3X", parts=[Mount.angled_mount_8_degrees, Cable.right_angle_obd_c_cable_1_5ft])
150+
four = BasePart("comma four", parts=[Mount.mount, Cable.obd_c_cable_2ft])
155151

156152

157153
class PartType(Enum):
@@ -163,7 +159,7 @@ class PartType(Enum):
163159
tool = Tool
164160

165161

166-
DEFAULT_CAR_PARTS: list[EnumBase] = [Device.threex]
162+
DEFAULT_CAR_PARTS: list[EnumBase] = [Device.four]
167163

168164

169165
@dataclass
@@ -262,6 +258,7 @@ def __post_init__(self):
262258
def init(self, CP: CarParams, all_footnotes=None):
263259
self.brand = CP.brand
264260
self.car_fingerprint = CP.carFingerprint
261+
self.longitudinal_control = CP.openpilotLongitudinalControl and not CP.alphaLongitudinalAvailable
265262

266263
if self.merged and CP.dashcamOnly:
267264
if self.support_type != SupportType.REVIEW:

opendbc/car/ford/values.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
from opendbc.car import Bus, CarSpecs, DbcDict, PlatformConfig, Platforms, uds
77
from opendbc.car.lateral import AngleSteeringLimits
88
from opendbc.car.structs import CarParams
9-
from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column, \
10-
Device
9+
from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column
1110
from opendbc.car.fw_query_definitions import FwQueryConfig, LiveFwVersions, OfflineFwVersions, Request, StdQueries, p16
1211

1312
Ecu = CarParams.Ecu
@@ -75,10 +74,7 @@ class FordCarDocs(CarDocs):
7574

7675
def init_make(self, CP: CarParams):
7776
harness = CarHarness.ford_q4 if CP.flags & FordFlags.CANFD else CarHarness.ford_q3
78-
if CP.carFingerprint in (CAR.FORD_BRONCO_SPORT_MK1, CAR.FORD_MAVERICK_MK1, CAR.FORD_F_150_MK14, CAR.FORD_F_150_LIGHTNING_MK1):
79-
self.car_parts = CarParts([Device.threex_angled_mount, harness])
80-
else:
81-
self.car_parts = CarParts([Device.threex, harness])
77+
self.car_parts = CarParts.common([harness])
8278

8379
if harness == CarHarness.ford_q4:
8480
self.setup_video = "https://www.youtube.com/watch?v=uUGkH6C_EQU"

opendbc/car/gm/values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class CAR(Platforms):
157157
)
158158
CHEVROLET_BOLT_EUV = GMPlatformConfig(
159159
[
160-
GMCarDocs("Chevrolet Bolt EUV 2022-23", "Premier or Premier Redline Trim without Super Cruise Package", video="https://youtu.be/xvwzGMUA210"),
160+
GMCarDocs("Chevrolet Bolt EUV 2022-23", "Premier or Premier Redline Trim, without Super Cruise Package", video="https://youtu.be/xvwzGMUA210"),
161161
GMCarDocs("Chevrolet Bolt EV 2022-23", "2LT Trim with Adaptive Cruise Control Package"),
162162
],
163163
GMCarSpecs(mass=1669, wheelbase=2.63779, steerRatio=16.8, centerToFrontRatio=0.4, tireStiffnessFactor=1.0),

opendbc/car/honda/fingerprints.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@
10361036
b'8S302-3D4-A050\x00\x00',
10371037
],
10381038
(Ecu.fwdCamera, 0x18dab5f1, None): [
1039+
b'8S102-3A0-A070\x00\x00',
10391040
b'8S102-3A0-A090\x00\x00',
10401041
b'8S102-3A0-A110\x00\x00',
10411042
b'8S102-3A0-A230\x00\x00',

opendbc/car/honda/values.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from opendbc.car import Bus, CarSpecs, DbcDict, PlatformConfig, Platforms, structs, uds
55
from opendbc.car.common.conversions import Conversions as CV
6-
from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column, Device
6+
from opendbc.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column
77
from opendbc.car.fw_query_definitions import FwQueryConfig, Request, StdQueries, p16
88

99
Ecu = structs.CarParams.Ecu
@@ -111,10 +111,7 @@ def init_make(self, CP: structs.CarParams):
111111
else:
112112
harness = CarHarness.nidec
113113

114-
if CP.carFingerprint in (CAR.HONDA_PILOT_4G, CAR.HONDA_PASSPORT_4G):
115-
self.car_parts = CarParts([Device.threex_angled_mount, harness])
116-
else:
117-
self.car_parts = CarParts.common([harness])
114+
self.car_parts = CarParts.common([harness])
118115

119116

120117
class Footnote(Enum):

opendbc/car/hyundai/fingerprints.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
b'\xf1\x00AEhe SCC FHCUP 1.00 1.02 99110-G2100 ',
155155
],
156156
(Ecu.eps, 0x7d4, None): [
157+
b'\xf1\x00AE MDPS C 1.00 1.01 56310-XX000 4APHC101',
157158
b'\xf1\x00AE MDPS C 1.00 1.01 56310/G2510 4APHC101',
158159
b'\xf1\x00AE MDPS C 1.00 1.01 56310G2510\x00 4APHC101',
159160
],

opendbc/car/hyundai/values.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from opendbc.car import Bus, CarSpecs, DbcDict, PlatformConfig, Platforms, uds
66
from opendbc.car.common.conversions import Conversions as CV
77
from opendbc.car.structs import CarParams
8-
from opendbc.car.docs_definitions import CarHarness, CarDocs, CarParts, Device
8+
from opendbc.car.docs_definitions import CarHarness, CarDocs, CarParts
99
from opendbc.car.fw_query_definitions import FwQueryConfig, Request, p16
1010

1111
Ecu = CarParams.Ecu
@@ -318,7 +318,7 @@ class CAR(Platforms):
318318
HYUNDAI_PALISADE = HyundaiPlatformConfig(
319319
[
320320
HyundaiCarDocs("Hyundai Palisade 2020-22", "All", video="https://youtu.be/TAnDqjF4fDY?t=456", car_parts=CarParts.common([CarHarness.hyundai_h])),
321-
HyundaiCarDocs("Kia Telluride 2020-22", "All", car_parts=CarParts([Device.threex_angled_mount, CarHarness.hyundai_h])),
321+
HyundaiCarDocs("Kia Telluride 2020-22", "All", car_parts=CarParts.common([CarHarness.hyundai_h])),
322322
],
323323
CarSpecs(mass=1999, wheelbase=2.9, steerRatio=15.6 * 1.15, tireStiffnessFactor=0.63),
324324
flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8,

0 commit comments

Comments
 (0)