Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HKG: ccNC port #1575

Draft
wants to merge 87 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
54b7f59
init
royjr Oct 22, 2024
98516a4
Merge branch 'commaai:master' into sonata-2024-port
royjr Nov 4, 2024
76352e1
Merge branch 'commaai:master' into sonata-2024-port
royjr Nov 12, 2024
7a276a6
Update routes.py
royjr Nov 12, 2024
5db23a7
Merge branch 'master' into sonata-2024-port
royjr Nov 21, 2024
f6f32d6
remove todo
royjr Nov 21, 2024
e87ae01
use default tireStiffnessFactor
royjr Nov 21, 2024
062d866
remove steerRatio factor
royjr Nov 21, 2024
9014534
Merge branch 'commaai:master' into sonata-2024-port
royjr Nov 24, 2024
6344abc
add new messages
royjr Nov 28, 2024
3743da8
block faults
royjr Nov 28, 2024
480c475
fix whitespace
royjr Nov 28, 2024
264c08d
fix fp
royjr Dec 1, 2024
029cf05
Update carcontroller.py
royjr Dec 7, 2024
205c6a4
Update carstate.py
royjr Dec 7, 2024
adc668f
Update hyundaicanfd.py
royjr Dec 7, 2024
d8c0c38
Update hyundai_canfd.dbc
royjr Dec 7, 2024
7ce5bb6
Merge branch 'commaai:master' into sonata-2024-port
royjr Dec 7, 2024
446b0c4
new
royjr Dec 10, 2024
26787f8
combine
royjr Dec 14, 2024
9c4a244
more
royjr Dec 14, 2024
5a583cc
wrong car
royjr Dec 14, 2024
f485cd9
HYUNDAI_SONATA_HEV_2024
royjr Dec 14, 2024
6de4cda
HYUNDAI_KONA_2ND_GEN
royjr Dec 14, 2024
f7c4efc
HYUNDAI_KONA_EV_2ND_GEN
royjr Dec 14, 2024
ced3afd
KIA_SORENTO_2024
royjr Dec 14, 2024
a614216
KIA_K5_2025
royjr Dec 14, 2024
920d310
< 160
royjr Dec 14, 2024
b640a76
ws
royjr Dec 14, 2024
aa8f017
Merge branch 'master' into ccnc-port
royjr Dec 14, 2024
c5fc68b
HyundaiFlags.CCNC
royjr Dec 14, 2024
43bbb5a
cleaner
royjr Dec 14, 2024
fb224af
shorter
royjr Dec 14, 2024
7c60363
combined LANELINE
royjr Dec 14, 2024
848e8ab
lca_min
royjr Dec 14, 2024
5144e99
combined lca
royjr Dec 14, 2024
b31006f
should be ok
royjr Dec 14, 2024
6df2b93
faster?
royjr Dec 14, 2024
8e3d143
better comments
royjr Dec 14, 2024
e5d8546
fwdCamera then fwdRadar
royjr Dec 14, 2024
37f3d23
fix lead distance
royjr Dec 14, 2024
3ac1ddd
fix lead
royjr Dec 15, 2024
79c6253
add left/right lane
royjr Dec 15, 2024
87c1723
not needed
royjr Dec 15, 2024
236878c
Merge branch 'commaai:master' into ccnc-port
royjr Dec 16, 2024
49ef8a0
add kona ev fp
royjr Dec 17, 2024
95f73ae
add camera data
royjr Dec 17, 2024
4fd8b2d
fancy lead
royjr Dec 17, 2024
95719e2
check flags too
royjr Dec 17, 2024
2a6d2d7
no hda2
royjr Dec 17, 2024
1fcbb45
Revert "fancy lead"
royjr Dec 17, 2024
fa03f89
block alert on stock long as well
royjr Dec 17, 2024
25faeeb
blah
royjr Dec 18, 2024
c3cce91
Revert "blah"
royjr Dec 18, 2024
10d09bb
add sonata hev fp
royjr Dec 19, 2024
951210d
sorento metric fix
royjr Dec 19, 2024
e5b005c
whoops
royjr Dec 19, 2024
fc6fda1
this hurts
royjr Dec 19, 2024
ebf1fa9
Merge branch 'commaai:master' into ccnc-port
royjr Dec 19, 2024
2333093
fix 161
royjr Dec 20, 2024
9d15ca5
add LFAHDA_CLUSTER
royjr Dec 20, 2024
e8e008d
fix LFA
royjr Dec 20, 2024
96c3b83
new signal for LFAHDA_CLUSTER
royjr Dec 20, 2024
6a0439d
new signal for LFA
royjr Dec 20, 2024
8a048e7
hide for now
royjr Dec 20, 2024
5e0a1d9
ew
royjr Dec 20, 2024
a5f5b80
keep hidden
royjr Dec 20, 2024
fc22d28
gate LFA
royjr Dec 20, 2024
931370d
stop lfa beeps
royjr Dec 20, 2024
f344320
hide WATCH_FOR_SURROUNDING_VEHICLES
royjr Dec 21, 2024
e6dd01a
only if enabled
royjr Dec 21, 2024
b74a357
Revert "only if enabled"
royjr Dec 21, 2024
e04bac7
fix alerts
royjr Dec 23, 2024
481ff8b
add 161 comments
royjr Dec 23, 2024
0379af4
missed this
royjr Dec 23, 2024
6289a0d
hide DRIVE_CAREFULLY
royjr Dec 23, 2024
def9487
this was stupid
royjr Dec 23, 2024
47c8336
sorento fix v2
royjr Dec 23, 2024
d23a3b4
Revert "sorento fix v2"
royjr Dec 24, 2024
2b3598a
sorento fix v3
royjr Dec 24, 2024
279ef4c
metric v4
royjr Dec 24, 2024
4fa745f
add 162 comments
royjr Dec 24, 2024
aacb0ec
increase STEER_MAX for CCNC
royjr Dec 26, 2024
dc34f52
Merge branch 'commaai:master' into ccnc-port
royjr Dec 26, 2024
a34ad27
Merge branch 'commaai:master' into ccnc-port
royjr Jan 7, 2025
4ab074a
lower STEER_MAX
royjr Jan 8, 2025
3d17467
back to 270 for now
royjr Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion opendbc/car/hyundai/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def update(self, CC, CS, now_nanos):

# LFA and HDA icons
if self.frame % 5 == 0 and (not hda2 or hda2_long):
can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled))
if self.CP.flags & HyundaiFlags.CCNC and not hda2:
can_sends.extend(hyundaicanfd.create_ccnc(self.packer, self.CAN, self.frame, self.CP, CC, CS))
else:
can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled))

# blinkers
if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
Expand Down
25 changes: 17 additions & 8 deletions opendbc/car/hyundai/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def __init__(self, CP):

self.cruise_info = {}

self.msg_161 = {}
self.msg_162 = {}

# On some cars, CLU15->CF_Clu_VehicleSpeed can oscillate faster than the dash updates. Sample at 5 Hz
self.cluster_speed = 0
self.cluster_speed_counter = CLUSTER_SAMPLE_RATE
Expand Down Expand Up @@ -224,15 +227,16 @@ def update_canfd(self, can_parsers) -> structs.CarState:
ret.steeringPressed = self.update_steering_pressed(abs(ret.steeringTorque) > self.params.STEER_THRESHOLD, 5)
ret.steerFaultTemporary = cp.vl["MDPS"]["LKA_FAULT"] != 0

# TODO: alt signal usage may be described by cp.vl['BLINKERS']['USE_ALT_LAMP']
left_blinker_sig, right_blinker_sig = "LEFT_LAMP", "RIGHT_LAMP"
if self.CP.carFingerprint == CAR.HYUNDAI_KONA_EV_2ND_GEN:
left_blinker_sig, right_blinker_sig = "LEFT_LAMP_ALT", "RIGHT_LAMP_ALT"
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(50, cp.vl["BLINKERS"][left_blinker_sig],
cp.vl["BLINKERS"][right_blinker_sig])
if self.CP.flags & HyundaiFlags.CCNC and not self.CP.flags & HyundaiFlags.CANFD_HDA2:
self.msg_161 = copy.copy(cp_cam.vl["MSG_161"])
self.msg_162 = copy.copy(cp_cam.vl["MSG_162"])

alt = "_ALT" if self.CP.flags & HyundaiFlags.CCNC and not self.CP.flags & HyundaiFlags.CANFD_HDA2 else ""
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(50, cp.vl["BLINKERS"][f"LEFT_LAMP{alt}"],
cp.vl["BLINKERS"][f"RIGHT_LAMP{alt}"])
if self.CP.enableBsm:
ret.leftBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"]["FL_INDICATOR"] != 0
ret.rightBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"]["FR_INDICATOR"] != 0
ret.leftBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"][f"FL_INDICATOR{alt}"] != 0
ret.rightBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"][f"FR_INDICATOR{alt}"] != 0

# cruise state
# CAN FD cars enable on main button press, set available if no TCS faults preventing engagement
Expand Down Expand Up @@ -316,6 +320,11 @@ def get_can_parsers_canfd(self, CP):
cam_messages += [
("SCC_CONTROL", 50),
]
if self.CP.flags & HyundaiFlags.CCNC and not self.CP.flags & HyundaiFlags.CANFD_HDA2:
cam_messages += [
("MSG_161", 20),
("MSG_162", 20),
]

return {
Bus.pt: CANParser(DBC[CP.carFingerprint][Bus.pt], pt_messages, CanBus(CP).ECAN),
Expand Down
51 changes: 48 additions & 3 deletions opendbc/car/hyundai/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.07 99211-L1000 211223',
],
},
CAR.HYUNDAI_SONATA_2024: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.01 99211-L1800 230512',
b'\xf1\x00DN8 MFC AT KOR LHD 1.00 1.01 99211-L1800 230512',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
],
},
CAR.HYUNDAI_SONATA_LF: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00LF__ SCC F-CUP 1.00 1.00 96401-C2200 ',
Expand Down Expand Up @@ -539,6 +548,16 @@
b'\xf1\x00OS9 LKAS AT USA LHD 1.00 1.00 95740-J9300 g21',
],
},
CAR.HYUNDAI_KONA_2ND_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00SX2 MFC AT USA LHD 1.00 1.03 99211-BE000 230517',
b'\xf1\x00SX2 MFC AT USA LHD 1.00 1.07 99211-BE000 240611',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE000 ',
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE500 ',
],
},
CAR.KIA_CEED: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00CD__ SCC F-CUP 1.00 1.02 99110-J7000 ',
Expand Down Expand Up @@ -602,6 +621,14 @@
b'\xf1\x00DL ESC \t 102"\x08\x10 58910-L3800',
],
},
CAR.KIA_K5_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DL3 MFC AT USA LHD 1.00 1.04 99210-L2500 240117',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DL3_ RDR ----- 1.00 1.01 99110-L2500 ',
],
},
CAR.KIA_K5_HEV_2020: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DLhe SCC FHCUP 1.00 1.02 99110-L7000 ',
Expand Down Expand Up @@ -680,11 +707,12 @@
],
},
CAR.HYUNDAI_KONA_EV_2ND_GEN: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00SXev RDR ----- 1.00 1.00 99110-BF000 ',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00SX2EMFC AT KOR LHD 1.00 1.00 99211-BF000 230410',
b'\xf1\x00SX2EMFC AT USA LHD 1.00 1.02 99211-BF000 230823',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00SXev RDR ----- 1.00 1.00 99110-BF000 ',
],
},
CAR.KIA_NIRO_EV: {
Expand Down Expand Up @@ -948,6 +976,15 @@
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.07 99211-L1000 211223',
],
},
CAR.HYUNDAI_SONATA_HEV_2024: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.01 99211-L1800 230512',
b'\xf1\x00DN8HMFC AT KOR LHD 1.00 1.01 99211-L1800 230512',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
],
},
CAR.KIA_SORENTO: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00UMP LKAS AT KOR LHD 1.00 1.00 95740-C5550 S30',
Expand Down Expand Up @@ -1119,6 +1156,14 @@
b'\xf1\x00MQ4_ SCC FHCUP 1.00 1.08 99110-P2000 ',
],
},
CAR.KIA_SORENTO_2024: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00MQ4 MFC AT AUS RHD 1.01 1.04 99210-P2550 231127',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00MQ4_ RDR ----- 1.00 1.01 99110-P2500 ',
],
},
CAR.KIA_SORENTO_HEV_4TH_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00MQ4HMFC AT KOR LHD 1.00 1.04 99210-P2000 200330',
Expand Down
104 changes: 93 additions & 11 deletions opendbc/car/hyundai/hyundaicanfd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from opendbc.car import CanBusBase
from opendbc.car.common.conversions import Conversions as CV
from opendbc.car.common.numpy_fast import clip
from opendbc.car.hyundai.values import HyundaiFlags

Expand Down Expand Up @@ -38,17 +39,26 @@ def create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer):

ret = []

values = {
"LKA_MODE": 2,
"LKA_ICON": 2 if enabled else 1,
"TORQUE_REQUEST": apply_steer,
"LKA_ASSIST": 0,
"STEER_REQ": 1 if lat_active else 0,
"STEER_MODE": 0,
"HAS_LANE_SAFETY": 0, # hide LKAS settings
"NEW_SIGNAL_1": 0,
"NEW_SIGNAL_2": 0,
}
if CP.flags & HyundaiFlags.CCNC:
values = {
"NEW_SIGNAL_1": 3 if lat_active else 1,
"TORQUE_REQUEST": apply_steer if lat_active else 0,
"STEER_REQ": 1 if lat_active else 0,
"NEW_SIGNAL_4": 9,
"NEW_SIGNAL_3": 10 if lat_active else 100, # TODO: value between 10-32+ sometimes
}
else:
values = {
"LKA_MODE": 2,
"LKA_ICON": 2 if enabled else 1,
"TORQUE_REQUEST": apply_steer,
"LKA_ASSIST": 0,
"STEER_REQ": 1 if lat_active else 0,
"STEER_MODE": 0,
"HAS_LANE_SAFETY": 0, # hide LKAS settings
"NEW_SIGNAL_1": 0,
"NEW_SIGNAL_2": 0,
}

if CP.flags & HyundaiFlags.CANFD_HDA2:
hda2_lkas_msg = "LKAS_ALT" if CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING else "LKAS"
Expand Down Expand Up @@ -119,6 +129,78 @@ def create_lfahda_cluster(packer, CAN, enabled):
}
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)

def create_ccnc(packer, CAN, frame, CP, CC, CS):
ret = []

msg_161 = CS.msg_161.copy()
msg_162 = CS.msg_162.copy()
enabled = CC.enabled
hud = CC.hudControl

# HIDE FAULTS
for f in ("FAULT_LSS", "FAULT_HDA", "FAULT_DAS"):
msg_162[f] = 0

# HIDE ALERTS
if msg_161.get("ALERTS_3") == 17: # DRIVE_CAREFULLY
msg_161["ALERTS_3"] = 0

if msg_161.get("ALERTS_5") == 2: # WATCH_FOR_SURROUNDING_VEHICLES
msg_161["ALERTS_5"] = 0

if msg_161.get("ALERTS_5") == 4: # SMART_CRUISE_CONTROL_CONDITIONS_NOT_MET
msg_161["ALERTS_5"] = 0

if msg_161.get("ALERTS_5") == 5: # USE_SWITCH_OR_PEDAL_TO_ACCELERATE
msg_161["ALERTS_5"] = 0

if msg_161.get("ALERTS_2") == 5: # CONSIDER_TAKING_A_BREAK
msg_161.update({"ALERTS_2": 0, "SOUNDS_2": 0, "DAW_ICON": 0})

if msg_161.get("SOUNDS_4") == 2 and msg_161.get("LFA_ICON") in (3, 0,): # LFA BEEPS
msg_161["SOUNDS_4"] = 0

# ICONS, LANELINES
msg_161.update({
"CENTERLINE": 1 if enabled else 0,
"LANELINE_LEFT": 2 if enabled else 0,
"LANELINE_RIGHT": 2 if enabled else 0,
"LFA_ICON": 2 if enabled else 0,
"LKA_ICON": 0,
})

# LFAHDA_CLUSTER
lfahda_cluster = {
"NEW_SIGNAL_5": 1,
"LFA_ICON": 2 if enabled else 0,
}

# OP LONG
if CP.openpilotLongitudinalControl:

# SETSPEED, DISTANCE
msg_161.update({
"SETSPEED": 3 if enabled else 1,
"SETSPEED_HUD": 2 if enabled else 1,
"SETSPEED_SPEED": 25 if (s := round(CS.out.vCruiseCluster * (1 if CS.is_metric else CV.KPH_TO_MPH))) > 100 else s,
"DISTANCE": hud.leadDistanceBars,
"DISTANCE_SPACING": 1 if enabled else 0,
"DISTANCE_LEAD": 2 if enabled and hud.leadVisible else 1 if enabled else 0,
"DISTANCE_CAR": 2 if enabled else 1,
"ALERTS_3": hud.leadDistanceBars + 6,
})

# LEAD
msg_162.update({
"LEAD": 2 if enabled and hud.leadVisible else 1 if hud.leadVisible else 0,
"LEAD_DISTANCE": 150,
})

ret.append(packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, lfahda_cluster))
ret.append(packer.make_can_msg("MSG_161", CAN.ECAN, msg_161))
ret.append(packer.make_can_msg("MSG_162", CAN.ECAN, msg_162))

return ret

def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_override, set_speed, hud_control):
jerk = 5
Expand Down
29 changes: 28 additions & 1 deletion opendbc/car/hyundai/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ class HyundaiFlags(IntFlag):

MIN_STEER_32_MPH = 2 ** 23

CCNC = 2 ** 24


class Footnote(Enum):
CANFD = CarFootnote(
Expand Down Expand Up @@ -222,6 +224,11 @@ class CAR(Platforms):
CarSpecs(mass=1275, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CLUSTER_GEARS | HyundaiFlags.ALT_LIMITS,
)
HYUNDAI_KONA_2ND_GEN = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Kona 2024", car_parts=CarParts.common([CarHarness.hyundai_l]))],
CarSpecs(mass=1590, wheelbase=2.66, steerRatio=13.6, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_KONA_EV = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Kona Electric 2018-21", car_parts=CarParts.common([CarHarness.hyundai_g]))],
CarSpecs(mass=1685, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385),
Expand All @@ -236,7 +243,7 @@ class CAR(Platforms):
[HyundaiCarDocs("Hyundai Kona Electric (with HDA II, Korea only) 2023", video_link="https://www.youtube.com/watch?v=U2fOCmcQ8hw",
car_parts=CarParts.common([CarHarness.hyundai_r]))],
CarSpecs(mass=1740, wheelbase=2.66, steerRatio=13.6, tireStiffnessFactor=0.385),
flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE,
flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE | HyundaiFlags.CCNC,
)
HYUNDAI_KONA_HEV = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Kona Hybrid 2020", car_parts=CarParts.common([CarHarness.hyundai_i]))], # TODO: check packages,
Expand Down Expand Up @@ -271,6 +278,11 @@ class CAR(Platforms):
CarSpecs(mass=1513, wheelbase=2.84, steerRatio=13.27 * 1.15, tireStiffnessFactor=0.65), # 15% higher at the center seems reasonable
flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8,
)
HYUNDAI_SONATA_2024 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Sonata 2024", "All", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=1556, wheelbase=2.84, steerRatio=12.81),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_SONATA_LF = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Sonata 2018-19", car_parts=CarParts.common([CarHarness.hyundai_e]))],
CarSpecs(mass=1536, wheelbase=2.804, steerRatio=13.27 * 1.15), # 15% higher at the center seems reasonable
Expand Down Expand Up @@ -307,6 +319,11 @@ class CAR(Platforms):
HYUNDAI_SONATA.specs,
flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID,
)
HYUNDAI_SONATA_HEV_2024 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Sonata Hybrid 2024", "All", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=1616, wheelbase=2.84, steerRatio=13.27),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_IONIQ_5 = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Hyundai Ioniq 5 (Southeast Asia and Europe only) 2022-24", "All", car_parts=CarParts.common([CarHarness.hyundai_q])),
Expand Down Expand Up @@ -354,6 +371,11 @@ class CAR(Platforms):
CarSpecs(mass=3381 * CV.LB_TO_KG, wheelbase=2.85, steerRatio=13.27, tireStiffnessFactor=0.5), # 2021 Kia K5 Steering Ratio (all trims)
flags=HyundaiFlags.CHECKSUM_CRC8,
)
KIA_K5_2025 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Kia K5 2025", "Highway Driving Assist", car_parts=CarParts.common([CarHarness.hyundai_m]))],
CarSpecs(mass=3230 * CV.LB_TO_KG, wheelbase=2.85, steerRatio=13.27),
flags=HyundaiFlags.CCNC,
)
KIA_K5_HEV_2020 = HyundaiPlatformConfig(
[HyundaiCarDocs("Kia K5 Hybrid 2020-22", car_parts=CarParts.common([CarHarness.hyundai_a]))],
KIA_K5_2021.specs,
Expand Down Expand Up @@ -457,6 +479,11 @@ class CAR(Platforms):
CarSpecs(mass=3957 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5), # average of the platforms
flags=HyundaiFlags.RADAR_SCC,
)
KIA_SORENTO_2024 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Kia Sorento 2024", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=3957 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5),
flags=HyundaiFlags.CCNC,
)
KIA_SORENTO_HEV_4TH_GEN = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Kia Sorento Hybrid 2021-23", "All", car_parts=CarParts.common([CarHarness.hyundai_a])),
Expand Down
5 changes: 5 additions & 0 deletions opendbc/car/tests/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ class CarTestRoute(NamedTuple):
CarTestRoute("6a42c1197b2a8179|2023-09-21--10-23-44", HYUNDAI.KIA_OPTIMA_H_G4_FL),
CarTestRoute("c75a59efa0ecd502|2021-03-11--20-52-55", HYUNDAI.KIA_SELTOS),
CarTestRoute("5b7c365c50084530|2020-04-15--16-13-24", HYUNDAI.HYUNDAI_SONATA),
CarTestRoute("4267ea8a353cdb36/00000262--8a427003c7", HYUNDAI.HYUNDAI_SONATA_2024),
CarTestRoute("b2a38c712dcf90bd|2020-05-18--18-12-48", HYUNDAI.HYUNDAI_SONATA_LF),
CarTestRoute("c344fd2492c7a9d2|2023-12-11--09-03-23", HYUNDAI.HYUNDAI_STARIA_4TH_GEN),
CarTestRoute("fb3fd42f0baaa2f8|2022-03-30--15-25-05", HYUNDAI.HYUNDAI_TUCSON),
CarTestRoute("db68bbe12250812c|2022-12-05--00-54-12", HYUNDAI.HYUNDAI_TUCSON_4TH_GEN), # 2023
CarTestRoute("36e10531feea61a4|2022-07-25--13-37-42", HYUNDAI.HYUNDAI_TUCSON_4TH_GEN), # hybrid
CarTestRoute("5875672fc1d4bf57|2020-07-23--21-33-28", HYUNDAI.KIA_SORENTO),
CarTestRoute("1d0d000db3370fd0|2023-01-04--22-28-42", HYUNDAI.KIA_SORENTO_4TH_GEN, segment=5),
CarTestRoute("60380edf6d76cb45/00000004--e450afc26c", HYUNDAI.KIA_SORENTO_2024),
CarTestRoute("fc19648042eb6896|2023-08-16--11-43-27", HYUNDAI.KIA_SORENTO_HEV_4TH_GEN, segment=14),
CarTestRoute("628935d7d3e5f4f7|2022-11-30--01-12-46", HYUNDAI.KIA_SORENTO_HEV_4TH_GEN), # plug-in hybrid
CarTestRoute("9c917ba0d42ffe78|2020-04-17--12-43-19", HYUNDAI.HYUNDAI_PALISADE),
Expand All @@ -152,6 +154,7 @@ class CarTestRoute(NamedTuple):
CarTestRoute("012c95f06918eca4|2023-01-15--11-19-36", HYUNDAI.HYUNDAI_IONIQ), # openpilot longitudinal enabled
CarTestRoute("ab59fe909f626921|2021-10-18--18-34-28", HYUNDAI.HYUNDAI_IONIQ_HEV_2022),
CarTestRoute("22d955b2cd499c22|2020-08-10--19-58-21", HYUNDAI.HYUNDAI_KONA),
CarTestRoute("8f4a9150d36961c8/00000001--960c4735d5", HYUNDAI.HYUNDAI_KONA_2ND_GEN),
CarTestRoute("efc48acf44b1e64d|2021-05-28--21-05-04", HYUNDAI.HYUNDAI_KONA_EV),
CarTestRoute("f90d3cd06caeb6fa|2023-09-06--17-15-47", HYUNDAI.HYUNDAI_KONA_EV), # openpilot longitudinal enabled
CarTestRoute("ff973b941a69366f|2022-07-28--22-01-19", HYUNDAI.HYUNDAI_KONA_EV_2022, segment=11),
Expand All @@ -164,6 +167,7 @@ class CarTestRoute(NamedTuple):
CarTestRoute("68d6a96e703c00c9|2022-09-10--16-09-39", HYUNDAI.KIA_EV6), # HDA1
CarTestRoute("9b25e8c1484a1b67|2023-04-13--10-41-45", HYUNDAI.KIA_EV6),
CarTestRoute("007d5e4ad9f86d13|2021-09-30--15-09-23", HYUNDAI.KIA_K5_2021),
CarTestRoute("todo", HYUNDAI.KIA_K5_2025),
CarTestRoute("c58dfc9fc16590e0|2023-01-14--13-51-48", HYUNDAI.KIA_K5_HEV_2020),
CarTestRoute("78ad5150de133637|2023-09-13--16-15-57", HYUNDAI.KIA_K8_HEV_1ST_GEN),
CarTestRoute("50c6c9b85fd1ff03|2020-10-26--17-56-06", HYUNDAI.KIA_NIRO_EV),
Expand All @@ -181,6 +185,7 @@ class CarTestRoute(NamedTuple):
CarTestRoute("82e9cdd3f43bf83e|2021-05-15--02-42-51", HYUNDAI.HYUNDAI_ELANTRA_2021),
CarTestRoute("715ac05b594e9c59|2021-06-20--16-21-07", HYUNDAI.HYUNDAI_ELANTRA_HEV_2021),
CarTestRoute("7120aa90bbc3add7|2021-08-02--07-12-31", HYUNDAI.HYUNDAI_SONATA_HYBRID),
CarTestRoute("bc40c72b728178f2/00000006--ee76ae8c42", HYUNDAI.HYUNDAI_SONATA_HEV_2024),
CarTestRoute("715ac05b594e9c59|2021-10-27--23-24-56", HYUNDAI.GENESIS_G70_2020),
CarTestRoute("6b0d44d22df18134|2023-05-06--10-36-55", HYUNDAI.GENESIS_GV80),

Expand Down
Loading
Loading