Alerts update (#20567)

* steer temp unavailable should be a soft disable

* no mute

* these should be no entries

* sound

* better name

* deprecated

* make vehicleModelInvalid a soft disable

* update refs

* bump cereal

* bump cereal

* update refs
old-commit-hash: 2fa1b2572d
commatwo_master
Adeeb Shihadeh 4 years ago committed by GitHub
parent 00b19b6351
commit 99b2c0d024
  1. 2
      cereal
  2. 2
      selfdrive/car/ford/interface.py
  3. 2
      selfdrive/car/gm/interface.py
  4. 28
      selfdrive/controls/lib/events.py
  5. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit dffb99383e4544d817765325f509d62698d9a562 Subproject commit 4222bc91043b4c9860a2abd31a8f5bda53593962

@ -61,7 +61,7 @@ class CarInterface(CarInterfaceBase):
events = self.create_common_events(ret) events = self.create_common_events(ret)
if self.CS.lkas_state not in [2, 3] and ret.vEgo > 13. * CV.MPH_TO_MS and ret.cruiseState.enabled: if self.CS.lkas_state not in [2, 3] and ret.vEgo > 13. * CV.MPH_TO_MS and ret.cruiseState.enabled:
events.add(car.CarEvent.EventName.steerTempUnavailableMute) events.add(car.CarEvent.EventName.steerTempUnavailable)
ret.events = events.to_msg() ret.events = events.to_msg()

@ -156,7 +156,7 @@ class CarInterface(CarInterfaceBase):
if ret.cruiseState.standstill: if ret.cruiseState.standstill:
events.add(EventName.resumeRequired) events.add(EventName.resumeRequired)
if self.CS.pcm_acc_status == AccState.FAULTED: if self.CS.pcm_acc_status == AccState.FAULTED:
events.add(EventName.controlsFailed) events.add(EventName.accFaulted)
if ret.vEgo < self.CP.minSteerSpeed: if ret.vEgo < self.CP.minSteerSpeed:
events.add(car.CarEvent.EventName.belowSteerSpeed) events.add(car.CarEvent.EventName.belowSteerSpeed)

@ -171,7 +171,7 @@ class EngagementAlert(Alert):
class NormalPermanentAlert(Alert): class NormalPermanentAlert(Alert):
def __init__(self, alert_text_1, alert_text_2): def __init__(self, alert_text_1, alert_text_2):
super().__init__(alert_text_1, alert_text_2, super().__init__(alert_text_1, alert_text_2,
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid if len(alert_text_2) else AlertSize.small,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2), Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
# ********** alert callback functions ********** # ********** alert callback functions **********
@ -292,6 +292,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
"Stock AEB: Risk of Collision", "Stock AEB: Risk of Collision",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.), Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.),
ET.NO_ENTRY: NoEntryAlert("Stock AEB: Risk of Collision"),
}, },
EventName.stockFcw: { EventName.stockFcw: {
@ -300,6 +301,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
"Stock FCW: Risk of Collision", "Stock FCW: Risk of Collision",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.), Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.),
ET.NO_ENTRY: NoEntryAlert("Stock FCW: Risk of Collision"),
}, },
EventName.fcw: { EventName.fcw: {
@ -330,6 +332,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName.vehicleModelInvalid: { EventName.vehicleModelInvalid: {
ET.NO_ENTRY: NoEntryAlert("Vehicle Parameter Identification Failed"), ET.NO_ENTRY: NoEntryAlert("Vehicle Parameter Identification Failed"),
ET.SOFT_DISABLE: SoftDisableAlert("Vehicle Parameter Identification Failed"),
ET.WARNING: Alert( ET.WARNING: Alert(
"Vehicle Parameter Identification Failed", "Vehicle Parameter Identification Failed",
"", "",
@ -337,14 +340,6 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
Priority.LOWEST, VisualAlert.steerRequired, AudibleAlert.none, .0, .0, .1), Priority.LOWEST, VisualAlert.steerRequired, AudibleAlert.none, .0, .0, .1),
}, },
EventName.steerTempUnavailableMute: {
ET.WARNING: Alert(
"TAKE CONTROL",
"Steering Temporarily Unavailable",
AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2),
},
EventName.preDriverDistracted: { EventName.preDriverDistracted: {
ET.WARNING: Alert( ET.WARNING: Alert(
"KEEP EYES ON ROAD: Driver Distracted", "KEEP EYES ON ROAD: Driver Distracted",
@ -518,11 +513,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
}, },
EventName.steerTempUnavailable: { EventName.steerTempUnavailable: {
ET.WARNING: Alert( ET.SOFT_DISABLE: SoftDisableAlert("Steering Temporarily Unavailable"),
"TAKE CONTROL",
"Steering Temporarily Unavailable",
AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 1.),
ET.NO_ENTRY: NoEntryAlert("Steering Temporarily Unavailable", ET.NO_ENTRY: NoEntryAlert("Steering Temporarily Unavailable",
duration_hud_alert=0.), duration_hud_alert=0.),
}, },
@ -648,9 +639,10 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
audible_alert=AudibleAlert.chimeDisengage), audible_alert=AudibleAlert.chimeDisengage),
}, },
EventName.controlsFailed: { EventName.accFaulted: {
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Failed"), ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Cruise Faulted"),
ET.NO_ENTRY: NoEntryAlert("Controls Failed"), ET.PERMANENT: NormalPermanentAlert("Cruise Faulted", ""),
ET.NO_ENTRY: NoEntryAlert("Cruise Faulted"),
}, },
EventName.controlsMismatch: { EventName.controlsMismatch: {
@ -734,7 +726,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
"Speed Too High", "Speed Too High",
"Model uncertain at this speed", "Model uncertain at this speed",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.none, 2.2, 3., 4.), Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
ET.NO_ENTRY: Alert( ET.NO_ENTRY: Alert(
"Speed Too High", "Speed Too High",
"Slow down to engage", "Slow down to engage",

@ -1 +1 @@
305c7a50812c20094998975b2966a7a5ad768e96 8f1c3a315c4cce62459c48bfb405b5d8c0fc2760
Loading…
Cancel
Save