diff --git a/openpilot/selfdrive/selfdrived/events.py b/openpilot/selfdrive/selfdrived/events.py index 69fa900be44442..cdc27dd0a14b42 100755 --- a/openpilot/selfdrive/selfdrived/events.py +++ b/openpilot/selfdrive/selfdrived/events.py @@ -287,7 +287,7 @@ def posenet_invalid_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.Sub def process_not_running_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: not_running = [p.name for p in sm['managerState'].processes if not p.running and p.shouldBeRunning] msg = ', '.join(not_running) - return NoEntryAlert(msg, alert_text_1="Process Not Running") + return NoEntryAlert(msg, alert_text_1="Process Not Running", priority=Priority.HIGH) def comm_issue_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: diff --git a/openpilot/selfdrive/selfdrived/tests/test_alerts.py b/openpilot/selfdrive/selfdrived/tests/test_alerts.py index f4ff093bd83109..09b74f81619f29 100644 --- a/openpilot/selfdrive/selfdrived/tests/test_alerts.py +++ b/openpilot/selfdrive/selfdrived/tests/test_alerts.py @@ -9,7 +9,7 @@ from openpilot.cereal.messaging import SubMaster from openpilot.common.basedir import BASEDIR from openpilot.common.params import Params -from openpilot.selfdrive.selfdrived.events import Alert, EVENTS, ET +from openpilot.selfdrive.selfdrived.events import Alert, EVENTS, ET, process_not_running_alert from openpilot.selfdrive.selfdrived.alertmanager import set_offroad_alert from openpilot.selfdrive.test.process_replay.process_replay import CONFIGS @@ -70,6 +70,12 @@ def test_alert_sanity_check(self): if event_type not in (ET.WARNING, ET.PERMANENT, ET.PRE_ENABLE): assert a.creation_delay == 0. + def test_process_not_running_alert_has_priority(self): + process_alert = process_not_running_alert(self.CP, self.CS, self.sm, False, 0, None) + steer_alert = EVENTS[log.OnroadEvent.EventName.steerUnavailable][ET.NO_ENTRY] + + assert process_alert.priority > steer_alert.priority + def test_offroad_alerts(self): params = Params() for a in self.offroad_alerts: