diff --git a/cereal/car.capnp b/cereal/car.capnp index 5300c83f86fd3c..9a5d0198e45089 100644 --- a/cereal/car.capnp +++ b/cereal/car.capnp @@ -72,6 +72,8 @@ struct CarEvent @0x9b1657f34caf3ad3 { calibrationProgress @47; lowBattery @48; invalidGiraffeHonda @49; + manualSteeringRequired @50; + manualSteeringRequiredBlinkersOn @51; } } diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index 7863242dd11b0c..2bfaf85ff0a5c4 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -56,6 +56,7 @@ def process_hud_alert(hud_alert): fcw_display = 0 steer_required = 0 acc_alert = 0 + if hud_alert == AH.NONE: # no alert pass elif hud_alert == AH.FCW: # FCW @@ -64,7 +65,7 @@ def process_hud_alert(hud_alert): steer_required = hud_alert[1] else: # any other ACC alert acc_alert = hud_alert[1] - + return fcw_display, steer_required, acc_alert @@ -124,8 +125,8 @@ def update(self, sendcan, enabled, CS, frame, actuators, \ snd_beep = snd_beep if snd_beep is not 0 else snd_chime # Do not send audible alert when steering is disabled or blinkers on - if not CS.lkMode or CS.left_blinker_on or CS.right_blinker_on: - snd_chime = 0 + #if not CS.lkMode or CS.left_blinker_on or CS.right_blinker_on: + # snd_chime = 0 #print chime, alert_id, hud_alert fcw_display, steer_required, acc_alert = process_hud_alert(hud_alert) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index cbb09f283a4ca1..54f0876ccde12d 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -509,7 +509,11 @@ def update(self, c): else: self.cam_can_invalid_count = 0 - if self.CS.steer_error: + if not self.CS.lkMode: + events.append(create_event('manualSteeringRequired', [ET.WARNING])) + elif self.CS.lkMode and (self.CS.left_blinker_on or self.CS.right_blinker_on): + events.append(create_event('manualSteeringRequiredBlinkersOn', [ET.WARNING])) + elif self.CS.steer_error: events.append(create_event('steerUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) elif self.CS.steer_warning: events.append(create_event('steerTempUnavailable', [ET.WARNING])) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 0a96c233516499..85e1218153c856 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -278,7 +278,7 @@ def state_control(plan, CS, CP, state, events, v_cruise_kph, v_cruise_kph_last, CS.steeringPressed, plan.dPoly, angle_offset, CP, VM, PL) # Send a "steering required alert" if saturation count has reached the limit - if LaC.sat_flag and CP.steerLimitAlert: + if LaC.sat_flag and CP.steerLimitAlert and CS.lkMode and not CS.leftBlinker and not CS.rightBlinker: AM.add("steerSaturated", enabled) # Parse permanent warnings to display constantly diff --git a/selfdrive/controls/lib/alerts.py b/selfdrive/controls/lib/alerts.py index cc9b19d5d4fa70..fb3473a4a62f1c 100644 --- a/selfdrive/controls/lib/alerts.py +++ b/selfdrive/controls/lib/alerts.py @@ -100,6 +100,20 @@ def __gt__(self, alert2): "Steering Temporarily Unavailable", AlertStatus.userPrompt, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2), + + Alert( + "manualSteeringRequired", + "MANUAL STEERING REQUIRED", + "Steering is Off - Press LKAS button to turn On", + AlertStatus.userPrompt, AlertSize.mid, + Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2), + + Alert( + "manualSteeringRequiredBlinkersOn", + "MANUAL STEERING REQUIRED", + "Left or Right Signal is On", + AlertStatus.userPrompt, AlertSize.mid, + Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2), Alert( "preDriverDistracted",