From 57f29968a2662bb49807f15165fd69254da0cc93 Mon Sep 17 00:00:00 2001 From: xps-genesis <65239463+xps-genesis@users.noreply.github.com> Date: Fri, 26 Jun 2020 15:16:06 -0400 Subject: [PATCH] Add Hyundai BSM signals (#1782) * Add Hyundai BSM signals to take advantage of BSM to block lane change when BSM active. * bug, added LCA11 to canparser previous check failed, fixed by adding LCA11 to canparser * update refs Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com> --- selfdrive/car/hyundai/carstate.py | 7 +++++++ selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 7dfc357aad..74b2e327df 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -115,6 +115,9 @@ class CarState(CarStateBase): ret.stockAeb = cp.vl["FCA11"]['FCA_CmdAct'] != 0 ret.stockFcw = cp.vl["FCA11"]['CF_VSM_Warn'] == 2 + + ret.leftBlindspot = cp.vl["LCA11"]["CF_Lca_IndLeft"] != 0 + ret.rightBlindspot = cp.vl["LCA11"]["CF_Lca_IndRight"] != 0 # save the entire LKAS11 and CLU11 self.lkas11 = cp_cam.vl["LKAS11"] @@ -171,6 +174,9 @@ class CarState(CarStateBase): ("ESC_Off_Step", "TCS15", 0), ("CF_Lvr_GearInf", "LVR11", 0), # Transmission Gear (0 = N or P, 1-8 = Fwd, 14 = Rev) + + ("CF_Lca_IndLeft", "LCA11", 0), + ("CF_Lca_IndRight", "LCA11", 0), ("CR_Mdps_StrColTq", "MDPS12", 0), ("CF_Mdps_ToiActive", "MDPS12", 0), @@ -205,6 +211,7 @@ class CarState(CarStateBase): ("SCC11", 50), ("SCC12", 50), ("FCA11", 50), + ("LCA11", 50), ] if CP.carFingerprint in EV_HYBRID: diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index de32dae9b2..25c62148c0 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -f0ff304da1765fd9cfd36d8c730f280315df91bf \ No newline at end of file +98d3ab8081d04d481adb83980c7852dec8881de5