cleanup for PR

pull/27829/head
Justin Newberry 2 years ago
parent 53a19bd82f
commit 264688dc0d
  1. 5
      .gitignore
  2. 12
      selfdrive/car/subaru/subarucan.py

5
.gitignore vendored

@ -82,7 +82,4 @@ build/
!**/.gitkeep
poetry.toml
sandbox/
settings
poetry.toml

@ -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 ***

Loading…
Cancel
Save