Skip to content

Commit

Permalink
Revert "Mazda: alert when LKAS is disabled (commaai#23273)"
Browse files Browse the repository at this point in the history
This reverts commit f25121b.
  • Loading branch information
adeebshihadeh committed Dec 21, 2021
1 parent f25121b commit c92199a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cereal
6 changes: 1 addition & 5 deletions selfdrive/car/mazda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def __init__(self, CP):
self.acc_active_last = False
self.low_speed_alert = False
self.lkas_allowed_speed = False
self.lkas_disabled = False

def update(self, cp, cp_cam):

Expand Down Expand Up @@ -92,12 +91,9 @@ def update(self, cp, cp_cam):

self.acc_active_last = ret.cruiseState.enabled

self.crz_btns_counter = cp.vl["CRZ_BTNS"]["CTR"]

# camera signals
self.lkas_disabled = cp_cam.vl["CAM_LANEINFO"]["LANE_LINES"] == 0
self.cam_lkas = cp_cam.vl["CAM_LKAS"]
self.cam_laneinfo = cp_cam.vl["CAM_LANEINFO"]
self.crz_btns_counter = cp.vl["CRZ_BTNS"]["CTR"]
ret.steerError = cp_cam.vl["CAM_LKAS"]["ERR_BIT_1"] == 1

return ret
Expand Down
4 changes: 1 addition & 3 deletions selfdrive/car/mazda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ def update(self, c, can_strings):
# events
events = self.create_common_events(ret)

if self.CS.lkas_disabled:
events.add(EventName.lkasDisabled)
elif self.CS.low_speed_alert:
if self.CS.low_speed_alert:
events.add(EventName.belowSteerSpeed)

ret.events = events.to_msg()
Expand Down
5 changes: 0 additions & 5 deletions selfdrive/controls/lib/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,4 @@ def joystick_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, sof
ET.NO_ENTRY: NoEntryAlert("Cruise Fault: Restart the Car"),
},

EventName.lkasDisabled: {
ET.PERMANENT: NormalPermanentAlert("LKAS Disabled: Enable LKAS to engage"),
ET.NO_ENTRY: NoEntryAlert("LKAS Disabled"),
},

}

0 comments on commit c92199a

Please sign in to comment.