Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions opendbc/car/mazda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def update(self, CC, CC_SP, CS, now_nanos):
# send HUD alerts
if self.frame % 50 == 0:
ldw = CC.hudControl.visualAlert == VisualAlert.ldw
steer_required = CC.hudControl.visualAlert == VisualAlert.steerRequired
# TODO: find a way to silence audible warnings so we can add more hud alerts
steer_required = steer_required and CS.lkas_allowed_speed
steer_required = CS.out.steerFaultTemporary
can_sends.append(mazdacan.create_alert_command(self.packer, CS.cam_laneinfo, ldw, steer_required))

# send steering command
Expand Down
3 changes: 2 additions & 1 deletion opendbc/car/mazda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def update(self, can_parsers) -> tuple[structs.CarState, structs.CarStateSP]:
# it should be enabled (steer lockout). Don't warn until we actually get lkas active
# and lose it again, i.e, after initial lkas activation
if self.CP.minSteerSpeed > 0:
ret.steerFaultTemporary = self.lkas_allowed_speed and lkas_blocked
# On if no driver torque the last 5 seconds
ret.steerFaultTemporary = cp.vl["STEER_RATE"]["HANDS_OFF_5_SECONDS"] == 1
else:
# CX-5 2022: EPS accepts steering at all speeds regardless of LKAS_BLOCK.
# Verified across 5.5M frames: LKAS_BLOCK never indicates a real steering failure.
Expand Down
Loading