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>
albatross
Adeeb Shihadeh 2021-03-25 21:37:38 -07:00 committed by GitHub
parent cfe4cea2c9
commit 367aec54d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: {