mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-06 15:25:43 +08:00
simpler
This commit is contained in:
@@ -164,14 +164,6 @@ class AugmentedRoadView(CameraView):
|
||||
# debug
|
||||
self._pm = messaging.PubMaster(['uiDebug'])
|
||||
|
||||
self._hide_camera = False
|
||||
|
||||
def show_event(self):
|
||||
self._update_params()
|
||||
|
||||
def _update_params(self):
|
||||
self._hide_camera = ui_state.params.get_bool("HideCamera")
|
||||
|
||||
def is_swiping_left(self) -> bool:
|
||||
"""Check if currently swiping left (for scroller to disable)."""
|
||||
return self._bookmark_icon.is_swiping_left()
|
||||
@@ -215,16 +207,9 @@ class AugmentedRoadView(CameraView):
|
||||
)
|
||||
|
||||
# Render the base camera view
|
||||
if self._hide_camera:
|
||||
if self._switching:
|
||||
self._handle_switch()
|
||||
self._ensure_connection()
|
||||
if self.client:
|
||||
self.client.recv(timeout_ms=0)
|
||||
self._calc_frame_matrix(self._content_rect)
|
||||
super()._render(self._content_rect)
|
||||
if ui_state.hide_camera:
|
||||
rl.draw_rectangle_rec(self._content_rect, rl.BLACK)
|
||||
else:
|
||||
super()._render(self._content_rect)
|
||||
|
||||
# Draw all UI overlays
|
||||
self._model_renderer.render(self._content_rect)
|
||||
|
||||
@@ -73,6 +73,7 @@ class UIStateSP:
|
||||
self.developer_ui = self.params.get("DevUIInfo")
|
||||
self.rainbow_path = self.params.get_bool("RainbowMode")
|
||||
self.chevron_metrics = self.params.get("ChevronInfo")
|
||||
self.hide_camera = self.params.get("HideCamera")
|
||||
|
||||
|
||||
class DeviceSP:
|
||||
|
||||
Reference in New Issue
Block a user