diff --git a/.gitignore b/.gitignore index b1dc32e34e..57e41108ec 100644 --- a/.gitignore +++ b/.gitignore @@ -82,7 +82,4 @@ build/ !**/.gitkeep -poetry.toml - -sandbox/ -settings \ No newline at end of file +poetry.toml \ No newline at end of file diff --git a/selfdrive/car/subaru/subarucan.py b/selfdrive/car/subaru/subarucan.py index b8dedbf7a3..cd06a7624e 100644 --- a/selfdrive/car/subaru/subarucan.py +++ b/selfdrive/car/subaru/subarucan.py @@ -68,25 +68,25 @@ def create_es_lkas(packer, es_lkas_msg, enabled, visual_alert, left_line, right_ return packer.make_can_msg("ES_LKAS_State", 0, values) def create_es_dashstatus(packer, dashstatus_msg): - values = copy.copy(dashstatus_msg) - # Filter stock LKAS disabled and Keep hands on steering wheel OFF alerts - if values["LKAS_State_Msg"] in [2, 3]: + if values["LKAS_State_Msg"] in (2, 3): values["LKAS_State_Msg"] = 0 return packer.make_can_msg("ES_DashStatus", 0, values) def create_infotainmentstatus(packer, infotainmentstatus_msg, visual_alert): - values = copy.copy(infotainmentstatus_msg) - # Filter stock LKAS disabled and Keep hands on steering wheel OFF alerts - if values["LKAS_State_Infotainment"] in [3,4]: + if values["LKAS_State_Infotainment"] in (3, 4): values["LKAS_State_Infotainment"] = 0 # Show Keep hands on wheel alert for openpilot steerRequired alert if visual_alert == VisualAlert.steerRequired: values["LKAS_State_Infotainment"] = 3 + # Show Obstacle Detected for fcw + if visual_alert == VisualAlert.fcw: + values["LKAS_State_Infotainment"] = 2 + return packer.make_can_msg("INFOTAINMENT_STATUS", 0, values) # *** Subaru Pre-global ***