From 20bc2bec65cd0d98670ccac42a6f77213eca9944 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 16 Feb 2022 17:38:18 -0800 Subject: [PATCH 1/3] add branch name to startup master alert --- selfdrive/controls/lib/events.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index fbce9460a88dc0..70f743241f71ca 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -6,6 +6,7 @@ from common.realtime import DT_CTRL from selfdrive.config import Conversions as CV from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER +from selfdrive.version import get_short_branch AlertSize = log.ControlsState.AlertSize AlertStatus = log.ControlsState.AlertStatus @@ -206,7 +207,6 @@ def func(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_ return SoftDisableAlert(alert_text_2) return func - def user_soft_disable_alert(alert_text_2: str) -> AlertCallbackType: def func(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: if soft_disable_time < int(0.5 / DT_CTRL): @@ -214,6 +214,8 @@ def func(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_ return UserSoftDisableAlert(alert_text_2) return func +def startup_master_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: + return StartupAlert("WARNING: This branch is not tested", get_short_branch("")) def below_engage_speed_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: return NoEntryAlert(f"Speed Below {get_display_speed(CP.minEnableSpeed, metric)}") @@ -280,8 +282,7 @@ def joystick_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, sof }, EventName.startupMaster: { - ET.PERMANENT: StartupAlert("WARNING: This branch is not tested", - alert_status=AlertStatus.userPrompt), + ET.PERMANENT: startup_master_alert, }, # Car is recognized, but marked as dashcam only From ec35d9040244398405758f4419839ca19fb98d3d Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 16 Feb 2022 19:11:24 -0800 Subject: [PATCH 2/3] still orange --- selfdrive/controls/lib/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 70f743241f71ca..235d9e10b68845 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -215,7 +215,7 @@ def func(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_ return func def startup_master_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: - return StartupAlert("WARNING: This branch is not tested", get_short_branch("")) + return StartupAlert("WARNING: This branch is not tested", get_short_branch(""), alert_status=AlertStatus.userPrompt) def below_engage_speed_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: return NoEntryAlert(f"Speed Below {get_display_speed(CP.minEnableSpeed, metric)}") From 560c44b45e40a33c52e3907ae69584d155b6eef7 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 16 Feb 2022 19:12:33 -0800 Subject: [PATCH 3/3] update refs --- selfdrive/test/process_replay/ref_commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 8a21a93920e3ba..54927403018e11 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -7077009f076000a475ec6b56e2f711e78daa876e \ No newline at end of file +ec35d9040244398405758f4419839ca19fb98d3d \ No newline at end of file