mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 03:13:48 +08:00
Merge pull request #964 from commaai/branch-alert
Add orange alert if you are not running a devel or release branch
This commit is contained in:
@@ -10,6 +10,9 @@ from selfdrive.car import gen_empty_fingerprint
|
||||
|
||||
def get_startup_alert(car_recognized, controller_available):
|
||||
alert = 'startup'
|
||||
if Params().get("GitRemote").decode('utf-8') in ['git@github.com:commaai/openpilot.git', 'https://github.com/commaai/openpilot.git']:
|
||||
if Params().get("GitBranch").decode('utf-8') not in ['devel', 'release2-staging', 'dashcam-staging', 'release2', 'dashcam']:
|
||||
alert = 'startupMaster'
|
||||
if not car_recognized:
|
||||
alert = 'startupNoCar'
|
||||
elif car_recognized and not controller_available:
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user