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

Hyundai: Sonata Hybrid 2024 Port #1397

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7de437c
init
royjr Oct 22, 2024
870b095
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Nov 4, 2024
55239df
remove hybrid flag
royjr Nov 4, 2024
451438f
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Nov 7, 2024
2fca390
Update routes.py
royjr Nov 7, 2024
39c3c10
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Nov 9, 2024
faabf23
better route
royjr Nov 9, 2024
72ce254
Merge branch 'master' into sonata-hev-2024-port
royjr Nov 21, 2024
3685381
remove todo
royjr Nov 21, 2024
35689ca
use default tireStiffnessFactor
royjr Nov 21, 2024
6874314
remove steerRatio factor
royjr Nov 21, 2024
42cd3f8
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Nov 23, 2024
a2fdff9
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Nov 24, 2024
77c11a6
add new messages
royjr Nov 28, 2024
fc402f6
block faults
royjr Nov 28, 2024
d8d59a2
fix whitespace
royjr Nov 28, 2024
2b52543
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Dec 4, 2024
85c4b40
better messages
royjr Dec 6, 2024
2fb07dd
Update carcontroller.py
royjr Dec 6, 2024
7db6b7f
Update carstate.py
royjr Dec 6, 2024
c4f23f5
Update hyundaicanfd.py
royjr Dec 6, 2024
290a358
add blindspot alt
royjr Dec 6, 2024
61c5db0
update lanelines
royjr Dec 7, 2024
5f3063e
fix indents
royjr Dec 7, 2024
1628aeb
Update hyundai_canfd.dbc
royjr Dec 7, 2024
bc9c940
Merge branch 'commaai:master' into sonata-hev-2024-port
royjr Dec 7, 2024
3de60d1
better!
royjr Dec 8, 2024
4a68d3b
even better
royjr Dec 8, 2024
5adcc7f
debugless
royjr Dec 8, 2024
09bd8d8
ew
royjr Dec 8, 2024
2de6be6
wrong one
royjr Dec 8, 2024
0a78aa3
no params
royjr Dec 9, 2024
e6948aa
more
royjr Dec 9, 2024
fc4895a
better
royjr Dec 10, 2024
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
2 changes: 1 addition & 1 deletion opendbc/car/hyundai/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def update_canfd(self, cp, cp_cam) -> structs.CarState:

# 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:
if self.CP.carFingerprint in (CAR.HYUNDAI_KONA_EV_2ND_GEN, CAR.HYUNDAI_SONATA_HEV_2024):
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])
Expand Down
8 changes: 8 additions & 0 deletions opendbc/car/hyundai/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,14 @@
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.07 99211-L1000 211223',
],
},
CAR.HYUNDAI_SONATA_HEV_2024: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.01 99211-L1800 230512',
],
},
CAR.KIA_SORENTO: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00UMP LKAS AT KOR LHD 1.00 1.00 95740-C5550 S30',
Expand Down
6 changes: 6 additions & 0 deletions opendbc/car/hyundai/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ 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 * 1.15, tireStiffnessFactor=0.65),
# TODO: confirm steerRatio increase
# TODO: confirm tireStiffnessFactor
royjr marked this conversation as resolved.
Show resolved Hide resolved
)
HYUNDAI_IONIQ_5 = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Hyundai Ioniq 5 (Non-US only) 2022-24", "All", car_parts=CarParts.common([CarHarness.hyundai_q])),
Expand Down
1 change: 1 addition & 0 deletions opendbc/car/tests/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,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
1 change: 1 addition & 0 deletions opendbc/car/torque_data/override.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"HYUNDAI_STARIA_4TH_GEN" = [1.8, 2.0, 0.15]
"GENESIS_GV70_ELECTRIFIED_1ST_GEN" = [1.9, 1.9, 0.09]
"GENESIS_G80_2ND_GEN_FL" = [2.5819356441497803, 2.5, 0.11244568973779678]
"HYUNDAI_SONATA_HEV_2024" = [2.5, 2.5, 0.1]

# Dashcam or fallback configured as ideal car
"MOCK" = [10.0, 10, 0.0]
Expand Down
Loading