From 3126714df6d321b323ff10cd9f1ca9c78a19ee7b Mon Sep 17 00:00:00 2001 From: Carlin Hefner <54586926+carleeno@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:18:42 -0600 Subject: [PATCH] Tesla: set enableBsm flag for 3 and Y (#403) Set enableBsm flag for Tesla 3Y --- selfdrive/car/tesla/carstate.py | 5 +++-- selfdrive/car/tesla/interface.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/tesla/carstate.py b/selfdrive/car/tesla/carstate.py index 4ec72a4f50..f08406b1ff 100644 --- a/selfdrive/car/tesla/carstate.py +++ b/selfdrive/car/tesla/carstate.py @@ -86,8 +86,9 @@ class CarState(CarStateBase): ret.seatbeltUnlatched = cp.vl["UI_warning"]["buckleStatus"] != 1 # Blindspot - ret.leftBlindspot = cp_cam.vl["DAS_status"]["DAS_blindSpotRearLeft"] != 0 - ret.rightBlindspot = cp_cam.vl["DAS_status"]["DAS_blindSpotRearRight"] != 0 + if self.CP.enableBsm: + ret.leftBlindspot = cp_cam.vl["DAS_status"]["DAS_blindSpotRearLeft"] != 0 + ret.rightBlindspot = cp_cam.vl["DAS_status"]["DAS_blindSpotRearRight"] != 0 # AEB ret.stockAeb = (cp_cam.vl["DAS_control"]["DAS_aebEvent"] == 1) diff --git a/selfdrive/car/tesla/interface.py b/selfdrive/car/tesla/interface.py index 33a92a48a2..9bac7ffe32 100755 --- a/selfdrive/car/tesla/interface.py +++ b/selfdrive/car/tesla/interface.py @@ -31,6 +31,7 @@ class CarInterface(CarInterfaceBase): flags |= Panda.FLAG_TESLA_LONG_CONTROL ret.openpilotLongitudinalControl = True ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.tesla, flags)] + ret.enableBsm = True ret.steerLimitTimer = 1.0 ret.steerActuatorDelay = 0.25