From 4782d352b287e2187620ec501fd727e8b5c17f19 Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Tue, 15 Jan 2019 21:41:43 +1100 Subject: [PATCH 1/2] Genesis Type 2 Port Both Port and Tuning work well. User is 'andrewhlr' on slack --- selfdrive/car/hyundai/interface.py | 9 +++++++++ selfdrive/car/hyundai/values.py | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index c525c0185e939b..d502fc2c720b7e 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -113,6 +113,15 @@ def get_params(candidate, fingerprint): ret.steerKiBP, ret.steerKpBP = [[0.], [0.]] ret.steerKpV, ret.steerKiV = [[0.16], [0.01]] ret.minSteerSpeed = 35 * CV.MPH_TO_MS + elif candidate == CAR.GENESIS_2: + ret.steerKf = 0.00005 + ret.steerRateCost = 0.5 + ret.mass = 2060 + std_cargo + ret.wheelbase = 3.01 + ret.steerRatio = 16.5 + ret.steerKiBP, ret.steerKpBP = [[0.], [0.]] + ret.steerKpV, ret.steerKiV = [[0.16], [0.01]] + ret.minSteerSpeed = 38 * CV.MPH_TO_MS elif candidate == CAR.KIA_STINGER: ret.steerKf = 0.00005 ret.steerRateCost = 0.5 diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 8de0252410b16b..2897ff1824c7f7 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -13,6 +13,7 @@ def get_hud_alerts(visual_alert, audible_alert): class CAR: ELANTRA = "HYUNDAI ELANTRA LIMITED ULTIMATE 2017" GENESIS = "HYUNDAI GENESIS 2018" + GENESIS_2 = "HYUNDAI GENESIS 2018 TYPE 2" KIA_SORENTO = "KIA SORENTO GT LINE 2018" KIA_STINGER = "KIA STINGER GT2 2018" SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019" @@ -30,6 +31,9 @@ class Buttons: CAR.GENESIS: [{ 67: 8, 68: 8, 304: 8, 320: 8, 339: 8, 356: 4, 544: 7, 593: 8, 608: 8, 688: 5, 809: 8, 832: 8, 854: 7, 870: 7, 871: 8, 872: 5, 897: 8, 902: 8, 903: 6, 916: 8, 1024: 2, 1040: 8, 1056: 8, 1057: 8, 1078: 4, 1107: 5, 1136: 8, 1151: 6, 1168: 7, 1170: 8, 1173: 8, 1184: 8, 1265: 4, 1280: 1, 1287: 4, 1292: 8, 1312: 8, 1322: 8, 1331: 8, 1332: 8, 1333: 8, 1334: 8, 1335: 8, 1342: 6, 1345: 8, 1363: 8, 1369: 8, 1370: 8, 1371: 8, 1378: 4, 1384: 5, 1407: 8, 1419: 8, 1427: 6, 1434: 2, 1456: 4 }], + CAR.GENESIS_2: [{ + 67: 8, 68: 8, 304: 8, 320: 8, 339: 8, 356: 4, 544: 7, 593: 8, 608: 8, 688: 5, 809: 8, 854: 7, 870: 7, 871: 8, 872: 5, 897: 8, 902: 8, 903: 6, 916: 8, 1024: 2, 1040: 8, 1056: 8, 1057: 8, 1078: 4, 1107: 5, 1136: 8, 1151: 6, 1168: 7, 1170: 8, 1173: 8, 1184: 8, 1265: 4, 1280: 1, 1281: 3, 1287: 4, 1292: 8, 1312: 8, 1322: 8, 1331: 8, 1332: 8, 1333: 8, 1334: 8, 1335: 8, 1345: 8, 1363: 8, 1369: 8, 1370: 8, 1378: 4, 1379: 8, 1384: 5, 1407: 8, 1419: 8, 1427: 6, 1434: 2, 1456: 4 + }], CAR.KIA_SORENTO: [{ 67: 8, 68: 8, 127: 8, 304: 8, 320: 8, 339: 8, 356: 4, 544: 8, 593: 8, 608: 8, 688: 5, 809: 8, 832: 8, 854: 7, 870: 7, 871: 8, 872: 8, 897: 8, 902: 8, 903: 8, 916: 8, 1040: 8, 1042: 8, 1056: 8, 1057: 8, 1064: 8, 1078: 4, 1107: 5, 1136: 8, 1151: 6, 1168: 7, 1170: 8, 1173: 8, 1265: 4, 1280: 1, 1287: 4, 1290: 8, 1292: 8, 1294: 8, 1312: 8, 1322: 8, 1331: 8, 1332: 8, 1333: 8, 1342: 6, 1345: 8, 1348: 8, 1363: 8, 1369: 8, 1370: 8, 1371: 8, 1384: 8, 1407: 8, 1411: 8, 1419: 8, 1425: 2, 1427: 6, 1444: 8, 1456: 4, 1470: 8, 1489: 1 }], @@ -45,13 +49,14 @@ class Buttons: CHECKSUM = { "crc8": [CAR.SANTA_FE], - "6B": [CAR.KIA_SORENTO, CAR.GENESIS], + "6B": [CAR.KIA_SORENTO, CAR.GENESIS, CAR.GENESIS_2], "7B": [CAR.KIA_STINGER, CAR.ELANTRA], } DBC = { CAR.ELANTRA: dbc_dict('hyundai_kia_generic', None), CAR.GENESIS: dbc_dict('hyundai_kia_generic', None), + CAR.GENESIS_2: dbc_dict('hyundai_kia_generic', None), CAR.KIA_SORENTO: dbc_dict('hyundai_kia_generic', None), CAR.KIA_STINGER: dbc_dict('hyundai_kia_generic', None), CAR.SANTA_FE: dbc_dict('hyundai_kia_generic', None), From c162988d5e2c2f21c90a680e1048c6251ff6c682 Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Wed, 16 Jan 2019 09:26:24 +1100 Subject: [PATCH 2/2] Correct wrong year --- README.md | 1 + selfdrive/car/hyundai/values.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 834254147be74c..ae8829af2c6e79 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Supported Cars | Honda | Ridgeline 2017-19 | Honda Sensing | Yes | Yes | 25mph1| 12mph | Nidec | | Hyundai | Santa Fe 2019 | All | Yes | Stock | 0mph | 0mph | Custom6| | Hyundai | Elantra 2017 | SCC + LKAS | Yes | Stock | 19mph | 34mph | Custom6| +| Hyundai | Genesis 2015 | All | Yes | Stock | 19mph | 34mph | Custom6| | Hyundai | Genesis 2018 | All | Yes | Stock | 19mph | 34mph | Custom6| | Kia | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | Custom6| | Kia | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom6| diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 2897ff1824c7f7..3216844c9c89b3 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -13,7 +13,7 @@ def get_hud_alerts(visual_alert, audible_alert): class CAR: ELANTRA = "HYUNDAI ELANTRA LIMITED ULTIMATE 2017" GENESIS = "HYUNDAI GENESIS 2018" - GENESIS_2 = "HYUNDAI GENESIS 2018 TYPE 2" + GENESIS_2 = "HYUNDAI GENESIS 2015" KIA_SORENTO = "KIA SORENTO GT LINE 2018" KIA_STINGER = "KIA STINGER GT2 2018" SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019"