From 013166a34ebbf86b4b64c1618135cf6833d26cda Mon Sep 17 00:00:00 2001 From: George Hotz Date: Fri, 17 Jan 2020 17:28:09 -0800 Subject: [PATCH] add alert --- selfdrive/car/car_helpers.py | 2 ++ selfdrive/controls/lib/alerts.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 4467788611..9f61dcda46 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -10,6 +10,8 @@ from selfdrive.car import gen_empty_fingerprint def get_startup_alert(car_recognized, controller_available): alert = 'startup' + if Params().get("GitBranch") in ['master', 'master-ci']: + alert = 'startupMaster' if not car_recognized: alert = 'startupNoCar' elif car_recognized and not controller_available: diff --git a/selfdrive/controls/lib/alerts.py b/selfdrive/controls/lib/alerts.py index 972a63ef8b..31d908052e 100644 --- a/selfdrive/controls/lib/alerts.py +++ b/selfdrive/controls/lib/alerts.py @@ -171,6 +171,13 @@ ALERTS = [ AlertStatus.normal, AlertSize.mid, Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., 15.), + Alert( + "startupMaster", + "WARNING: This branch is not tested", + "Always keep hands on wheel and eyes on road", + AlertStatus.userPrompt, AlertSize.mid, + Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., 15.), + Alert( "startupNoControl", "Dashcam mode",