Compare commits

...

15 Commits

Author SHA1 Message Date
royjr
0491242b4a Merge branch 'master' into visuals-hide-camera 2026-03-15 15:14:12 -04:00
royjr
1b89608ccc Merge branch 'master' into visuals-hide-camera 2026-03-02 02:42:15 -05:00
royjr
53a24655d2 move to visuals 2026-02-13 22:18:08 -05:00
royjr
c9f92a8c76 no mici toggle 2026-02-13 22:11:36 -05:00
royjr
10b1d673c9 Apply description suggestion from @sunnyhaibin
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-13 22:10:02 -05:00
Jason Wen
7080167daf Merge branch 'master' into visuals-hide-camera 2026-02-13 17:03:34 -05:00
Jason Wen
c7a1c70504 Merge remote-tracking branch 'sunnypilot/sunnypilot/master' into visuals-hide-camera
# Conflicts:
#	selfdrive/ui/sunnypilot/ui_state.py
2026-02-13 16:55:01 -05:00
royjr
c6a6caf6ff Merge branch 'master' into visuals-hide-camera 2026-02-05 00:52:57 -05:00
royjr
8d49a44f52 Merge branch 'master' into visuals-hide-camera 2025-12-31 15:09:29 -05:00
royjr
3434ca9d3e bool 2025-12-31 14:19:32 -05:00
royjr
e4f8a5edd1 Update params_keys.h 2025-12-29 14:45:47 -05:00
royjr
1f4f9bd4bd big ui 2025-12-29 02:00:42 -05:00
royjr
455e730c4c simpler 2025-12-29 01:53:12 -05:00
royjr
b243d4e356 fix param 2025-12-29 01:12:00 -05:00
royjr
de0550d47b init 2025-12-29 01:06:47 -05:00
6 changed files with 15 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
{"GsmRoaming", {PERSISTENT | BACKUP, BOOL}},
{"HardwareSerial", {PERSISTENT, STRING}},
{"HasAcceptedTerms", {PERSISTENT, STRING, "0"}},
{"HideCamera", {PERSISTENT | BACKUP, BOOL, "0"}},
{"InstallDate", {PERSISTENT, TIME}},
{"IsDriverViewEnabled", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsEngaged", {PERSISTENT, BOOL}},

View File

@@ -212,6 +212,8 @@ class AugmentedRoadView(CameraView):
# Render the base camera view
super()._render(self._content_rect)
if ui_state.hide_camera:
rl.draw_rectangle_rec(self._content_rect, rl.BLACK)
# Draw all UI overlays
self._model_renderer.render(self._content_rect)

View File

@@ -91,6 +91,8 @@ class AugmentedRoadView(CameraView, AugmentedRoadViewSP):
# Render the base camera view
super()._render(rect)
if ui_state.hide_camera:
rl.draw_rectangle_rec(self._content_rect, rl.BLACK)
# Draw all UI overlays
self.model_renderer.render(self._content_rect)

View File

@@ -93,6 +93,11 @@ class VisualsLayout(Widget):
"This displays what the car is currently doing, not what the planner is requesting."),
None,
),
"HideCamera": (
lambda: tr("Hide Camera"),
tr("Hide the camera live view from the driving screen."),
None,
),
}
self._toggles = {}
for param, (title, desc, callback) in self._toggle_defs.items():

View File

@@ -133,6 +133,7 @@ class UIStateSP:
self.chevron_metrics = self.params.get("ChevronInfo")
self.custom_interactive_timeout = self.params.get("InteractivityTimeout", return_default=True)
self.developer_ui = self.params.get("DevUIInfo")
self.hide_camera = self.params.get_bool("HideCamera")
self.hide_v_ego_ui = self.params.get_bool("HideVEgoUI")
self.onroad_brightness = int(float(self.params.get("OnroadScreenOffBrightness", return_default=True)))
self.onroad_brightness_timer_param = self.params.get("OnroadScreenOffTimer", return_default=True)

View File

@@ -370,6 +370,10 @@
"title": "Has Accepted sunnypilot Terms",
"description": ""
},
"HideCamera": {
"title": "Hide Camera",
"description": "Hide the camera live view from the driving screen."
},
"HideVEgoUI": {
"title": "[TIZI/TICI only] Speedometer: Hide from Onroad Screen",
"description": "When enabled, the speedometer on the onroad screen is not displayed."