Skip to content

Commit

Permalink
Toyota: Display Blue Barriers When Engaged, Matches OEM Design (#23150)
Browse files Browse the repository at this point in the history
  • Loading branch information
krkeegan committed Dec 15, 2021
1 parent cd190dc commit 245b4d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion selfdrive/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def update(self, enabled, active, CS, frame, actuators, pcm_cancel_cmd, hud_aler
send_ui = True

if (frame % 100 == 0 or send_ui):
can_sends.append(create_ui_command(self.packer, steer_alert, pcm_cancel_cmd, left_line, right_line, left_lane_depart, right_lane_depart))
can_sends.append(create_ui_command(self.packer, steer_alert, pcm_cancel_cmd, left_line, right_line, left_lane_depart, right_lane_depart, enabled))

if frame % 100 == 0 and CS.CP.enableDsu:
can_sends.append(create_fcw_command(self.packer, fcw_alert))
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/car/toyota/toyotacan.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ def create_fcw_command(packer, fcw):
return packer.make_can_msg("ACC_HUD", 0, values)


def create_ui_command(packer, steer, chime, left_line, right_line, left_lane_depart, right_lane_depart):
def create_ui_command(packer, steer, chime, left_line, right_line, left_lane_depart, right_lane_depart, enabled):
values = {
"RIGHT_LINE": 3 if right_lane_depart else 1 if right_line else 2,
"LEFT_LINE": 3 if left_lane_depart else 1 if left_line else 2,
"BARRIERS" : 3 if left_lane_depart else 2 if right_lane_depart else 0,
"BARRIERS" : 1 if enabled else 0,
"SET_ME_X0C": 0x0c,
"SET_ME_X2C": 0x2c,
"SET_ME_X38": 0x38,
Expand Down

0 comments on commit 245b4d9

Please sign in to comment.