show persistent dashcam mode alert (#20483)

* always show dashcam mode alert

* show persistent dashcam mode alert

* lowest

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 367aec54d1
This commit is contained in:
Adeeb Shihadeh 2021-03-25 21:37:38 -07:00 committed by GitHub
parent 85ab6b1c79
commit 092db4eadc
3 changed files with 8 additions and 6 deletions

2
cereal

@ -1 +1 @@
Subproject commit 38ecbfe03b4b3cdc984c6358a58df2b471aea968
Subproject commit e1741865f8117f27206b0225b4c48fa7432b830f

View File

@ -144,6 +144,8 @@ class Controls:
self.events.add(EventName.communityFeatureDisallowed, static=True)
if not car_recognized:
self.events.add(EventName.carUnrecognized, static=True)
elif self.read_only:
self.events.add(EventName.dashcamMode, static=True)
# controlsd is driven by can recv, expected at 100Hz
self.rk = Ratekeeper(100, print_delay_threshold=None)

View File

@ -253,12 +253,12 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
},
EventName.startupOneplus: {
EventName.dashcamMode: {
ET.PERMANENT: Alert(
"WARNING: Original EON deprecated",
"Device will no longer update",
AlertStatus.userPrompt, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
"Dashcam Mode",
"",
AlertStatus.normal, AlertSize.small,
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
},
EventName.invalidLkasSetting: {