From 4c4a9ee8679cb123656eebe1f377498bf23294f4 Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 13 Jan 2021 11:57:24 -0600 Subject: [PATCH 1/6] Update Hyundai Santa fe FP and constant Added fingerprint for hyundai santafe limited 2020 and updated the constant description for class --- selfdrive/car/hyundai/values.py | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 1b8a39f174c089..5da8a52c97d818 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -28,7 +28,7 @@ class CAR: IONIQ_EV_2020 = "HYUNDAI IONIQ ELECTRIC 2020" KONA = "HYUNDAI KONA 2020" KONA_EV = "HYUNDAI KONA ELECTRIC 2019" - SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019" + SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019-2020" SONATA = "HYUNDAI SONATA 2020" SONATA_2019 = "HYUNDAI SONATA 2019" PALISADE = "HYUNDAI PALISADE 2020" @@ -208,12 +208,31 @@ class Buttons: ], }, CAR.SANTA_FE: { - (Ecu.fwdRadar, 0x7d0, None): [b'\xf1\x00TM__ SCC F-CUP 1.00 1.02 99110-S2000 \xf1\xa01.02'], - (Ecu.esp, 0x7d1, None): [b'\xf1\x00TM ESC \x02 100\x18\x030 58910-S2600\xf1\xa01.00',], - (Ecu.engine, 0x7e0, None): [b'\xf1\x81606EA051\x00\x00\x00\x00\x00\x00\x00\x00'], - (Ecu.eps, 0x7d4, None): [b'\xf1\x00TM MDPS C 1.00 1.00 56340-S2000 8409'], - (Ecu.fwdCamera, 0x7c4, None): [b'\xf1\x00TM MFC AT USA LHD 1.00 1.00 99211-S2000 180409'], - (Ecu.transmission, 0x7e1, None): [b'\xf1\x87SBJWAA6562474GG0ffvgeTeFx\x88\x97\x88ww\x87www\x87w\x84o\xfa\xff\x87fO\xff\xc2 \xf1\x816W3C2051\x00\x00\xf1\x006W351_C2\x00\x006W3C2051\x00\x00TTM2G24NS1\x00\x00\x00\x00'], + (Ecu.fwdRadar, 0x7d0, None): [ + b'\xf1\x00TM__ SCC F-CUP 1.00 1.03 99110-S2000 \xf1\xa01.03', + b'\xf1\x00TM__ SCC F-CUP 1.00 1.02 99110-S2000 \xf1\xa01.02', + ], + (Ecu.esp, 0x7d1, None): [ + b'\xf1\x00TM ESC \r 104\x19\a\b 58910-S2650\xf1\xa01.04', + b'\xf1\x00TM ESC \x02 100\x18\x030 58910-S2600\xf1\xa01.00', + ], + (Ecu.engine, 0x7e0, None): [ + b'\xf1\x81606G3051\x00\x00\x00\x00\x00\x00\x00\x00', + b'\xf1\x81606EA051\x00\x00\x00\x00\x00\x00\x00\x00', + ], + (Ecu.eps, 0x7d4, None): [ + b'\xf1\x00TM MDPS C 1.00 1.01 56340-S2000 9129', + b'\xf1\x00TM MDPS C 1.00 1.00 56340-S2000 8409', + ], + (Ecu.fwdCamera, 0x7c4, None): [ + b'\xf1\x00TM MFC AT USA LHD 1.00 1.00 99211-S2000 180409', + b'\xf1\x00TM MFC AT USA LHD 1.00 1.00 99211-S2000 180409', + ], + (Ecu.transmission, 0x7e1, None): [ + b'\xf1\x87LDLUEA6159884HG1\x88\x87hv\x99\x99y\x97\x89\xaa\xb8\x9ax\x99\x87\x89y\x99\xb7\x99\xa7?\xf7\xff\x97wo\xff\xf3\x05\xf1\x816W3E1051\x00\x00\xf1\x006W351_C2\x00\x006W3E1051\x00\x00TTM4T20NS5\x00\x00\x00\x00', + b'\xf1\x87SBJWAA6562474GG0ffvgeTeFx\x88\x97\x88ww\x87www\x87w\x84o\xfa\xff\x87fO\xff\xc2 \xf1\x816W3C2051\x00\x00\xf1\x006W351_C2\x00\x006W3C2051\x00\x00TTM2G24NS1\x00\x00\x00\x00', + + ], }, CAR.KIA_STINGER: { (Ecu.fwdRadar, 0x7d0, None): [ b'\xf1\x00CK__ SCC F_CUP 1.00 1.01 96400-J5100 \xf1\xa01.01'], From fdcbdecb2213d4d76e61af1a30bc528e940758ad Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 13 Jan 2021 12:29:47 -0600 Subject: [PATCH 2/6] Update values.py --- selfdrive/car/hyundai/values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 5da8a52c97d818..d89dc4866a4b64 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -28,7 +28,7 @@ class CAR: IONIQ_EV_2020 = "HYUNDAI IONIQ ELECTRIC 2020" KONA = "HYUNDAI KONA 2020" KONA_EV = "HYUNDAI KONA ELECTRIC 2019" - SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019-2020" + SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019" SONATA = "HYUNDAI SONATA 2020" SONATA_2019 = "HYUNDAI SONATA 2019" PALISADE = "HYUNDAI PALISADE 2020" From 13265f97046197cce7229d5b998315f3154a0589 Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 13 Jan 2021 12:44:17 -0600 Subject: [PATCH 3/6] removed duplicate from santafe fwdCamera --- selfdrive/car/hyundai/values.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index d89dc4866a4b64..67a824bab98d86 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -226,12 +226,10 @@ class Buttons: ], (Ecu.fwdCamera, 0x7c4, None): [ b'\xf1\x00TM MFC AT USA LHD 1.00 1.00 99211-S2000 180409', - b'\xf1\x00TM MFC AT USA LHD 1.00 1.00 99211-S2000 180409', ], (Ecu.transmission, 0x7e1, None): [ b'\xf1\x87LDLUEA6159884HG1\x88\x87hv\x99\x99y\x97\x89\xaa\xb8\x9ax\x99\x87\x89y\x99\xb7\x99\xa7?\xf7\xff\x97wo\xff\xf3\x05\xf1\x816W3E1051\x00\x00\xf1\x006W351_C2\x00\x006W3E1051\x00\x00TTM4T20NS5\x00\x00\x00\x00', b'\xf1\x87SBJWAA6562474GG0ffvgeTeFx\x88\x97\x88ww\x87www\x87w\x84o\xfa\xff\x87fO\xff\xc2 \xf1\x816W3C2051\x00\x00\xf1\x006W351_C2\x00\x006W3C2051\x00\x00TTM2G24NS1\x00\x00\x00\x00', - ], }, CAR.KIA_STINGER: { From e13c74f9f88d182c014f0854864dfbeb877c5ae0 Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 20 Jan 2021 07:16:20 -0600 Subject: [PATCH 4/6] add bsm to santa fe for lane change --- selfdrive/car/hyundai/values.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 131b9e77fcaf9d..3c115957d2397f 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -359,9 +359,9 @@ class Buttons: "use_elect_gears": set([CAR.KIA_NIRO_EV, CAR.KIA_OPTIMA_H, CAR.IONIQ_EV_LTD, CAR.KONA_EV, CAR.IONIQ, CAR.IONIQ_EV_2020]), # these cars use the FCA11 message for the AEB and FCW signals, all others use SCC12 - "use_fca": set([CAR.SONATA, CAR.ELANTRA, CAR.ELANTRA_GT_I30, CAR.KIA_STINGER, CAR.IONIQ, CAR.IONIQ_EV_2020, CAR.KONA_EV, CAR.KIA_FORTE, CAR.KIA_NIRO_EV, CAR.PALISADE, CAR.GENESIS_G70, CAR.KONA]), + "use_fca": set([CAR.SONATA, CAR.ELANTRA, CAR.ELANTRA_GT_I30, CAR.KIA_STINGER, CAR.IONIQ, CAR.IONIQ_EV_2020, CAR.KONA_EV, CAR.KIA_FORTE, CAR.KIA_NIRO_EV, CAR.PALISADE, CAR.GENESIS_G70, CAR.KONA, CAR.SANTA_FE]), - "use_bsm": set([CAR.SONATA, CAR.PALISADE, CAR.HYUNDAI_GENESIS, CAR.GENESIS_G70, CAR.GENESIS_G80, CAR.GENESIS_G90, CAR.KONA, CAR.IONIQ_EV_2020]), + "use_bsm": set([CAR.SONATA, CAR.PALISADE, CAR.HYUNDAI_GENESIS, CAR.GENESIS_G70, CAR.GENESIS_G80, CAR.GENESIS_G90, CAR.KONA, CAR.IONIQ_EV_2020, CAR.SANTA_FE]), } EV_HYBRID = set([CAR.IONIQ_EV_2020, CAR.IONIQ_EV_LTD, CAR.IONIQ, CAR.KONA_EV, CAR.KIA_NIRO_EV]) From f1a3ede920d3e34336fa18ae3c888041d4d9d4f6 Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 20 Jan 2021 08:47:17 -0600 Subject: [PATCH 5/6] added allow nudgeless bypass --- selfdrive/controls/lib/pathplanner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/pathplanner.py b/selfdrive/controls/lib/pathplanner.py index c3f239704e14a6..6240a4e7ea54b8 100644 --- a/selfdrive/controls/lib/pathplanner.py +++ b/selfdrive/controls/lib/pathplanner.py @@ -17,8 +17,9 @@ LOG_MPC = os.environ.get('LOG_MPC', False) -LANE_CHANGE_SPEED_MIN = 45 * CV.MPH_TO_MS +LANE_CHANGE_SPEED_MIN = 45 * CV.MPH_TO_MS #change minimum LANE_CHANGE_TIME_MAX = 10. +LANE_CHANGE_NUDGE_LESS = False DESIRES = { LaneChangeDirection.none: { @@ -131,7 +132,7 @@ def update(self, sm, pm, CP, VM): elif self.lane_change_state == LaneChangeState.preLaneChange: if not one_blinker or below_lane_change_speed: self.lane_change_state = LaneChangeState.off - elif torque_applied and not blindspot_detected: + elif (torque_applied or LANE_CHANGE_NUDGE_LESS) and not blindspot_detected: self.lane_change_state = LaneChangeState.laneChangeStarting # starting From aea93162a4f6fc920f11da7a1674bb422f8a3b30 Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 20 Jan 2021 14:36:02 -0600 Subject: [PATCH 6/6] Revert "added allow nudgeless bypass" This reverts commit f1a3ede920d3e34336fa18ae3c888041d4d9d4f6. --- selfdrive/controls/lib/pathplanner.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/selfdrive/controls/lib/pathplanner.py b/selfdrive/controls/lib/pathplanner.py index 6240a4e7ea54b8..c3f239704e14a6 100644 --- a/selfdrive/controls/lib/pathplanner.py +++ b/selfdrive/controls/lib/pathplanner.py @@ -17,9 +17,8 @@ LOG_MPC = os.environ.get('LOG_MPC', False) -LANE_CHANGE_SPEED_MIN = 45 * CV.MPH_TO_MS #change minimum +LANE_CHANGE_SPEED_MIN = 45 * CV.MPH_TO_MS LANE_CHANGE_TIME_MAX = 10. -LANE_CHANGE_NUDGE_LESS = False DESIRES = { LaneChangeDirection.none: { @@ -132,7 +131,7 @@ def update(self, sm, pm, CP, VM): elif self.lane_change_state == LaneChangeState.preLaneChange: if not one_blinker or below_lane_change_speed: self.lane_change_state = LaneChangeState.off - elif (torque_applied or LANE_CHANGE_NUDGE_LESS) and not blindspot_detected: + elif torque_applied and not blindspot_detected: self.lane_change_state = LaneChangeState.laneChangeStarting # starting