Skip to content

Commit 3974b17

Browse files
authored
Merge branch 'master' into odyssey-singapore
2 parents 9804230 + 4086420 commit 3974b17

File tree

20 files changed

+287
-148
lines changed

20 files changed

+287
-148
lines changed

docs/CARS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
|Mazda|CX-5 2022-25|All|[Upstream](#upstream)|
243243
|Mazda|CX-9 2016-20|All|[Dashcam mode](#dashcam)|
244244
|Mazda|CX-9 2021-23|All|[Upstream](#upstream)|
245-
|Nissan|Altima 2019-20|ProPILOT Assist|[Upstream](#upstream)|
245+
|Nissan|Altima 2019-20, 2024|ProPILOT Assist|[Upstream](#upstream)|
246246
|Nissan|Leaf 2018-23|ProPILOT Assist|[Upstream](#upstream)|
247247
|Nissan|Rogue 2018-20|ProPILOT Assist|[Upstream](#upstream)|
248248
|Nissan|X-Trail 2017|ProPILOT Assist|[Upstream](#upstream)|

opendbc/car/car.capnp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,22 +549,23 @@ struct CarParams {
549549
}
550550

551551
struct LateralTorqueTuning {
552-
kp @1 :Float32;
553-
ki @2 :Float32;
554552
friction @3 :Float32;
555-
kf @4 :Float32;
556553
steeringAngleDeadzoneDeg @5 :Float32;
557554
latAccelFactor @6 :Float32;
558555
latAccelOffset @7 :Float32;
559556
useSteeringAngleDEPRECATED @0 :Bool;
557+
kpDEPRECATED @1 :Float32;
558+
kiDEPRECATED @2 :Float32;
559+
kfDEPRECATED @4 :Float32;
560+
kdDEPRECATED @8 : Float32;
560561
}
561562

562563
struct LongitudinalPIDTuning {
563564
kpBP @0 :List(Float32);
564565
kpV @1 :List(Float32);
565566
kiBP @2 :List(Float32);
566567
kiV @3 :List(Float32);
567-
kf @6 :Float32;
568+
kfDEPRECATED @6 :Float32;
568569
deadzoneBPDEPRECATED @4 :List(Float32);
569570
deadzoneVDEPRECATED @5 :List(Float32);
570571
}

opendbc/car/chrysler/fingerprints.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
b'68402707AB',
352352
b'68402708AB',
353353
b'68402714AB',
354+
b'68402736AB',
354355
b'68402971AD',
355356
b'68454144AD',
356357
b'68454145AB',
@@ -379,6 +380,7 @@
379380
b'68417279AA',
380381
b'68417280AA',
381382
b'68417281AA',
383+
b'68417283AA',
382384
b'68453431AA',
383385
b'68453433AA',
384386
b'68453435AA',
@@ -391,6 +393,7 @@
391393
b'05035674AB ',
392394
b'68412635AE ',
393395
b'68412635AG ',
396+
b'68412635AH ',
394397
b'68412660AD ',
395398
b'68412660AF ',
396399
b'68422860AB',
@@ -404,6 +407,7 @@
404407
(Ecu.transmission, 0x7e1, None): [
405408
b'05035707AA',
406409
b'68419672AC',
410+
b'68419675AC',
407411
b'68419678AB',
408412
b'68423905AB',
409413
b'68449258AC',

opendbc/car/docs_definitions.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,13 @@ class Device(EnumBase):
152152
threex = BasePart("comma 3X", parts=[Mount.mount, Cable.right_angle_obd_c_cable_1_5ft])
153153
# variant of comma 3X with angled mounts
154154
threex_angled_mount = BasePart("comma 3X", parts=[Mount.angled_mount_8_degrees, Cable.right_angle_obd_c_cable_1_5ft])
155-
red_panda = BasePart("red panda")
156-
157-
158-
class Kit(EnumBase):
159-
red_panda_kit = BasePart("CAN FD panda kit", parts=[Device.red_panda, Accessory.harness_box,
160-
Cable.usb_a_2_a_cable, Cable.usbc_otg_cable, Cable.obd_c_cable_1_5ft])
161155

162156

163157
class PartType(Enum):
164158
accessory = Accessory
165159
cable = Cable
166160
connector = CarHarness
167161
device = Device
168-
kit = Kit
169162
mount = Mount
170163
tool = Tool
171164

opendbc/car/honda/fingerprints.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
],
2727
(Ecu.fwdCamera, 0x18dab5f1, None): [
2828
b'38897-TTA-J010\x00\x00',
29-
]
29+
],
3030
},
3131
CAR.HONDA_ACCORD: {
3232
(Ecu.shiftByWire, 0x18da0bf1, None): [
@@ -331,6 +331,7 @@
331331
(Ecu.vsa, 0x18da28f1, None): [
332332
b'57114-T1W-A230\x00\x00',
333333
b'57114-T1W-A240\x00\x00',
334+
b'57114-TFF-A930\x00\x00',
334335
b'57114-TFF-A940\x00\x00',
335336
],
336337
(Ecu.srs, 0x18da53f1, None): [
@@ -1072,7 +1073,7 @@
10721073
(Ecu.fwdRadar, 0x18dab0f1, None): [
10731074
b'36802-TGV-A060\x00\x00',
10741075
],
1075-
(Ecu.fwdCamera, 0x18dab5f1, None): [
1076+
(Ecu.fwdCamera, 0x18dab5f1, None): [
10761077
b'36161-TGV-A030\x00\x00',
10771078
],
10781079
},

opendbc/car/honda/hondacan.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ def create_steering_control(packer, CAN, apply_torque, lkas_active, tja_control)
118118
values = {
119119
"STEER_TORQUE": apply_torque if lkas_active else 0,
120120
"STEER_TORQUE_REQUEST": lkas_active,
121-
"STEER_DOWN_TO_ZERO": lkas_active and tja_control,
122121
}
122+
123+
if tja_control:
124+
values["STEER_DOWN_TO_ZERO"] = lkas_active
125+
123126
return packer.make_can_msg("STEERING_CONTROL", CAN.lkas, values)
124127

125128

opendbc/car/honda/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo
4848
# If Bosch radarless, this blocks ACC messages from the camera
4949
# TODO: get radar disable working on Bosch CANFD
5050
ret.alphaLongitudinalAvailable = candidate not in HONDA_BOSCH_CANFD
51-
ret.openpilotLongitudinalControl = alpha_long
51+
ret.openpilotLongitudinalControl = alpha_long and (candidate not in HONDA_BOSCH_CANFD)
5252
ret.pcmCruise = not ret.openpilotLongitudinalControl
5353
else:
5454
ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.hondaNidec)]

opendbc/car/honda/tests/test_honda.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import re
22

33
from opendbc.car.honda.fingerprints import FW_VERSIONS
4+
from opendbc.car.honda.values import HONDA_BOSCH, HONDA_BOSCH_TJA_CONTROL
45

56
HONDA_FW_VERSION_RE = br"[A-Z0-9]{5}-[A-Z0-9]{3}(-|,)[A-Z0-9]{4}(\x00){2}$"
67

@@ -12,3 +13,6 @@ def test_fw_version_format(self):
1213
for fws in fw_by_ecu.values():
1314
for fw in fws:
1415
assert re.match(HONDA_FW_VERSION_RE, fw) is not None, fw
16+
17+
def test_tja_bosch_only(self):
18+
assert set(HONDA_BOSCH_TJA_CONTROL).issubset(set(HONDA_BOSCH)), "Nidec car found in TJA control list"

opendbc/car/hyundai/values.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import re
22
from dataclasses import dataclass, field
3-
from enum import Enum, IntFlag
3+
from enum import IntFlag
44

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 CarFootnote, CarHarness, CarDocs, CarParts, Column, Device
8+
from opendbc.car.docs_definitions import CarHarness, CarDocs, CarParts, Device
99
from opendbc.car.fw_query_definitions import FwQueryConfig, Request, p16
1010

1111
Ecu = CarParams.Ecu
@@ -127,21 +127,10 @@ class HyundaiFlags(IntFlag):
127127
ALT_LIMITS_2 = 2 ** 26
128128

129129

130-
class Footnote(Enum):
131-
CANFD = CarFootnote(
132-
"Requires a <a href=\"https://comma.ai/shop/can-fd-panda-kit\" target=\"_blank\">CAN FD panda kit</a> if not using " +
133-
"comma 3X for this <a href=\"https://en.wikipedia.org/wiki/CAN_FD\" target=\"_blank\">CAN FD car</a>.",
134-
Column.MODEL)
135-
136-
137130
@dataclass
138131
class HyundaiCarDocs(CarDocs):
139132
package: str = "Smart Cruise Control (SCC)"
140133

141-
def init_make(self, CP: CarParams):
142-
if CP.flags & HyundaiFlags.CANFD:
143-
self.footnotes.insert(0, Footnote.CANFD)
144-
145134

146135
@dataclass
147136
class HyundaiPlatformConfig(PlatformConfig):

opendbc/car/interfaces.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ def get_std_params(candidate: str) -> structs.CarParams:
210210
ret.stoppingDecelRate = 0.8 # brake_travel/s while trying to stop
211211
ret.vEgoStopping = 0.5
212212
ret.vEgoStarting = 0.5
213-
ret.longitudinalTuning.kf = 1.
214213
ret.longitudinalTuning.kpBP = [0.]
215214
ret.longitudinalTuning.kpV = [0.]
216215
ret.longitudinalTuning.kiBP = [0.]
@@ -225,9 +224,6 @@ def configure_torque_tune(candidate: str, tune: structs.CarParams.LateralTuning,
225224
params = get_torque_params()[candidate]
226225

227226
tune.init('torque')
228-
tune.torque.kf = 1.0
229-
tune.torque.kp = 1.0
230-
tune.torque.ki = 0.3
231227
tune.torque.friction = params['FRICTION']
232228
tune.torque.latAccelFactor = params['LAT_ACCEL_FACTOR']
233229
tune.torque.latAccelOffset = 0.0

0 commit comments

Comments
 (0)