mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-30 23:03:46 +08:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2cf73a226 | |||
| a672c41a51 | |||
| 426f8b9579 | |||
| 05f13176d2 | |||
| 77fd53c2b8 | |||
| 38cf284043 | |||
| 8a06ed7ad2 | |||
| 30322aee1c | |||
| 5292924533 | |||
| 7994422cc7 | |||
| a1abdd8981 | |||
| 4f2fbe941a | |||
| a92aaaab20 | |||
| 3437ab10d6 | |||
| 3a687f054f | |||
| 7db5046aa8 | |||
| cca5f80118 | |||
| 7b92cebe5e | |||
| c0a60ec45f | |||
| ceef2536ba | |||
| 295d5b470d | |||
| ce36b82444 | |||
| 717b9c7a39 | |||
| fbec850a3c | |||
| b021fa1e6c | |||
| 56db298683 |
@@ -1,5 +1,6 @@
|
||||
Version 0.9.5 (202X-XX-XX)
|
||||
========================
|
||||
* Hyundai Ioniq 6 2023 support thanks to sunnyhaibin, mob9221, and sshane!
|
||||
* Kia Sorento Hybrid 2023 support thanks to sunnyhaibin!
|
||||
* Lexus IS 2023 support thanks to L3R5!
|
||||
|
||||
|
||||
+2
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
A supported vehicle is one that just works when you install a comma three. All supported cars provide a better experience than any stock system. Supported vehicles reference the US market unless otherwise specified.
|
||||
|
||||
# 258 Supported Cars
|
||||
# 259 Supported Cars
|
||||
|
||||
|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Resume from stop|<a href="##"><img width=2000></a>Hardware Needed<br> |Video|
|
||||
|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
@@ -80,6 +80,7 @@ A supported vehicle is one that just works when you install a comma three. All s
|
||||
|Hyundai|Ioniq 5 (Southeast Asia only) 2022-23[<sup>6</sup>](#footnotes)|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai Q connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq 5 (Southeast Asia only) 2022-23">Buy Here</a></sub></details>||
|
||||
|Hyundai|Ioniq 5 (with HDA II) 2022-23[<sup>6</sup>](#footnotes)|Highway Driving Assist II|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai Q connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq 5 (with HDA II) 2022-23">Buy Here</a></sub></details>||
|
||||
|Hyundai|Ioniq 5 (without HDA II) 2022-23[<sup>6</sup>](#footnotes)|Highway Driving Assist|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai K connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq 5 (without HDA II) 2022-23">Buy Here</a></sub></details>||
|
||||
|Hyundai|Ioniq 6 (with HDA II) 2023[<sup>6</sup>](#footnotes)|Highway Driving Assist II|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai P connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq 6 (with HDA II) 2023">Buy Here</a></sub></details>||
|
||||
|Hyundai|Ioniq Electric 2019|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai C connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq Electric 2019">Buy Here</a></sub></details>||
|
||||
|Hyundai|Ioniq Electric 2020|All|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai H connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq Electric 2020">Buy Here</a></sub></details>||
|
||||
|Hyundai|Ioniq Hybrid 2017-19|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai C connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma power v2<br>- 1 comma three<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Hyundai&model=Ioniq Hybrid 2017-19">Buy Here</a></sub></details>||
|
||||
|
||||
+1
-1
Submodule opendbc updated: a30a6775a5...8fbaf9af5e
+1
-1
Submodule panda updated: 0eb04fae67...8753ad0b47
@@ -106,13 +106,18 @@ class CarController:
|
||||
if self.CP.carFingerprint in CANFD_CAR:
|
||||
hda2 = self.CP.flags & HyundaiFlags.CANFD_HDA2
|
||||
hda2_long = hda2 and self.CP.openpilotLongitudinalControl
|
||||
hda2_alt_steering = self.CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING
|
||||
|
||||
# steering control
|
||||
can_sends.extend(hyundaicanfd.create_steering_messages(self.packer, self.CP, self.CAN, CC.enabled, apply_steer_req, apply_steer))
|
||||
|
||||
# disable LFA on HDA2
|
||||
if self.frame % 5 == 0 and hda2:
|
||||
can_sends.append(hyundaicanfd.create_cam_0x2a4(self.packer, self.CAN, CS.cam_0x2a4))
|
||||
# TODO: consolidate both messages, they have similar definitions
|
||||
if hda2_alt_steering:
|
||||
can_sends.append(hyundaicanfd.create_cam_0x362(self.packer, self.CAN, CS.cam_0x362))
|
||||
else:
|
||||
can_sends.append(hyundaicanfd.create_cam_0x2a4(self.packer, self.CAN, CS.cam_0x2a4))
|
||||
|
||||
# LFA and HDA icons
|
||||
if self.frame % 5 == 0 and (not hda2 or hda2_long):
|
||||
|
||||
@@ -228,8 +228,12 @@ class CarState(CarStateBase):
|
||||
self.buttons_counter = cp.vl[self.cruise_btns_msg_canfd]["COUNTER"]
|
||||
ret.accFaulted = cp.vl["TCS"]["ACCEnable"] != 0 # 0 ACC CONTROL ENABLED, 1-3 ACC CONTROL DISABLED
|
||||
|
||||
# TODO: consolidate both messages, they have similar definitions
|
||||
if self.CP.flags & HyundaiFlags.CANFD_HDA2:
|
||||
self.cam_0x2a4 = copy.copy(cp_cam.vl["CAM_0x2a4"])
|
||||
if self.CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING:
|
||||
self.cam_0x362 = copy.copy(cp_cam.vl["CAM_0x362"])
|
||||
else:
|
||||
self.cam_0x2a4 = copy.copy(cp_cam.vl["CAM_0x2a4"])
|
||||
|
||||
return ret
|
||||
|
||||
@@ -332,7 +336,8 @@ class CarState(CarStateBase):
|
||||
def get_cam_can_parser_canfd(CP):
|
||||
messages = []
|
||||
if CP.flags & HyundaiFlags.CANFD_HDA2:
|
||||
messages += [("CAM_0x2a4", 20)]
|
||||
block_lfa_msg = "CAM_0x362" if CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING else "CAM_0x2a4"
|
||||
messages += [(block_lfa_msg, 20)]
|
||||
elif CP.flags & HyundaiFlags.CANFD_CAMERA_SCC:
|
||||
messages += [
|
||||
("SCC_CONTROL", 50),
|
||||
|
||||
@@ -52,9 +52,10 @@ def create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer):
|
||||
}
|
||||
|
||||
if CP.flags & HyundaiFlags.CANFD_HDA2:
|
||||
hda2_steering_msg = "LKAS_ALT" if CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING else "LKAS"
|
||||
if CP.openpilotLongitudinalControl:
|
||||
ret.append(packer.make_can_msg("LFA", CAN.ECAN, values))
|
||||
ret.append(packer.make_can_msg("LKAS", CAN.ACAN, values))
|
||||
ret.append(packer.make_can_msg(hda2_steering_msg, CAN.ACAN, values))
|
||||
else:
|
||||
ret.append(packer.make_can_msg("LFA", CAN.ECAN, values))
|
||||
|
||||
@@ -66,6 +67,15 @@ def create_cam_0x2a4(packer, CAN, cam_0x2a4):
|
||||
values["BYTE7"] = 0
|
||||
return packer.make_can_msg("CAM_0x2a4", CAN.ACAN, values)
|
||||
|
||||
def create_cam_0x362(packer, CAN, cam_0x362):
|
||||
values = {f"BYTE{i}": cam_0x362[f"BYTE{i}"] for i in range(3, 32) if i != 7}
|
||||
values["COUNTER"] = cam_0x362["COUNTER"]
|
||||
values["NEW_SIGNAL_1"] = cam_0x362["NEW_SIGNAL_1"]
|
||||
values["NEW_SIGNAL_2"] = cam_0x362["NEW_SIGNAL_2"]
|
||||
values["LEFT_LANELINES"] = 0
|
||||
values["RIGHT_LANELINES"] = 0
|
||||
return packer.make_can_msg("CAM_0x362", CAN.ACAN, values)
|
||||
|
||||
def create_buttons(packer, CP, CAN, cnt, btn):
|
||||
values = {
|
||||
"COUNTER": cnt,
|
||||
@@ -173,7 +183,6 @@ def create_adrv_messages(packer, CAN, frame):
|
||||
|
||||
values = {
|
||||
}
|
||||
ret.append(packer.make_can_msg("ADRV_0x51", CAN.ACAN, values))
|
||||
|
||||
if frame % 2 == 0:
|
||||
values = {
|
||||
|
||||
@@ -29,7 +29,7 @@ class CarInterface(CarInterfaceBase):
|
||||
# These cars likely still work fine. Once a user confirms each car works and a test route is
|
||||
# added to selfdrive/car/tests/routes.py, we can remove it from this list.
|
||||
# FIXME: the Optima Hybrid uses a different SCC12 checksum
|
||||
ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, CAR.IONIQ_6}
|
||||
ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, }
|
||||
|
||||
hda2 = Ecu.adas in [fw.ecu for fw in car_fw]
|
||||
CAN = CanBus(None, hda2, fingerprint)
|
||||
@@ -38,6 +38,8 @@ class CarInterface(CarInterfaceBase):
|
||||
# detect HDA2 with ADAS Driving ECU
|
||||
if hda2:
|
||||
ret.flags |= HyundaiFlags.CANFD_HDA2.value
|
||||
if 0x50 not in fingerprint[CAN.CAM]:
|
||||
ret.flags |= HyundaiFlags.CANFD_HDA2_ALT_STEERING.value
|
||||
else:
|
||||
# non-HDA2
|
||||
if 0x1cf not in fingerprint[CAN.ECAN]:
|
||||
@@ -277,6 +279,8 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
if ret.flags & HyundaiFlags.CANFD_HDA2:
|
||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_HDA2
|
||||
if ret.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING:
|
||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_HDA2_ALT_STEERING
|
||||
if ret.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_ALT_BUTTONS
|
||||
if ret.flags & HyundaiFlags.CANFD_CAMERA_SCC:
|
||||
|
||||
@@ -64,6 +64,7 @@ class HyundaiFlags(IntFlag):
|
||||
CANFD_ALT_GEARS_2 = 64
|
||||
SEND_LFA = 128
|
||||
USE_FCA = 256
|
||||
CANFD_HDA2_ALT_STEERING = 512
|
||||
|
||||
|
||||
class CAR:
|
||||
@@ -198,8 +199,6 @@ CAR_INFO: Dict[str, Optional[Union[HyundaiCarInfo, List[HyundaiCarInfo]]]] = {
|
||||
HyundaiCarInfo("Hyundai Ioniq 5 (with HDA II) 2022-23", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_q])),
|
||||
],
|
||||
CAR.IONIQ_6: [
|
||||
# TODO: unknown
|
||||
HyundaiCarInfo("Hyundai Ioniq 6 (without HDA II) 2023", "Highway Driving Assist", car_parts=CarParts.common([CarHarness.hyundai_k])),
|
||||
HyundaiCarInfo("Hyundai Ioniq 6 (with HDA II) 2023", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p])),
|
||||
],
|
||||
CAR.TUCSON_4TH_GEN: [
|
||||
|
||||
@@ -22,7 +22,6 @@ non_tested_cars = [
|
||||
GM.MALIBU,
|
||||
GM.EQUINOX,
|
||||
HYUNDAI.GENESIS_G90,
|
||||
HYUNDAI.IONIQ_6,
|
||||
HONDA.ODYSSEY_CHN,
|
||||
VOLKSWAGEN.CRAFTER_MK2, # need a route from an ACC-equipped Crafter
|
||||
TOYOTA.RAV4_TSS2_2023,
|
||||
@@ -124,6 +123,7 @@ routes = [
|
||||
CarTestRoute("628935d7d3e5f4f7|2022-11-30--01-12-46", HYUNDAI.KIA_SORENTO_PHEV_4TH_GEN),
|
||||
CarTestRoute("9c917ba0d42ffe78|2020-04-17--12-43-19", HYUNDAI.PALISADE),
|
||||
CarTestRoute("05a8f0197fdac372|2022-10-19--14-14-09", HYUNDAI.IONIQ_5), # HDA2
|
||||
CarTestRoute("eb4eae1476647463|2023-08-26--18-07-04", HYUNDAI.IONIQ_6), # HDA2
|
||||
CarTestRoute("3f29334d6134fcd4|2022-03-30--22-00-50", HYUNDAI.IONIQ_PHEV_2019),
|
||||
CarTestRoute("fa8db5869167f821|2021-06-10--22-50-10", HYUNDAI.IONIQ_PHEV),
|
||||
CarTestRoute("2c5cf2dd6102e5da|2020-12-17--16-06-44", HYUNDAI.IONIQ_EV_2020),
|
||||
|
||||
Reference in New Issue
Block a user