mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-09 15:25:30 +08:00
Compare commits
19 Commits
master
...
visuals-hi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
978366d817 | ||
|
|
e97dd7f9cd | ||
|
|
d3c05b2ef8 | ||
|
|
74f4f0f10e | ||
|
|
0491242b4a | ||
|
|
1b89608ccc | ||
|
|
53a24655d2 | ||
|
|
c9f92a8c76 | ||
|
|
10b1d673c9 | ||
|
|
7080167daf | ||
|
|
c7a1c70504 | ||
|
|
c6a6caf6ff | ||
|
|
8d49a44f52 | ||
|
|
3434ca9d3e | ||
|
|
e4f8a5edd1 | ||
|
|
1f4f9bd4bd | ||
|
|
455e730c4c | ||
|
|
b243d4e356 | ||
|
|
de0550d47b |
@@ -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}},
|
||||
|
||||
@@ -213,6 +213,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)
|
||||
|
||||
@@ -86,6 +86,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)
|
||||
|
||||
@@ -134,11 +134,6 @@ class SteeringLayout(Widget):
|
||||
|
||||
enforce_torque_enabled = self._torque_control_toggle.action_item.get_state()
|
||||
nnlc_enabled = self._nnlc_toggle.action_item.get_state()
|
||||
if enforce_torque_enabled and nnlc_enabled:
|
||||
self._torque_control_toggle.action_item.set_state(False)
|
||||
self._nnlc_toggle.action_item.set_state(False)
|
||||
enforce_torque_enabled = False
|
||||
nnlc_enabled = False
|
||||
self._nnlc_toggle.action_item.set_enabled(ui_state.is_offroad() and torque_allowed and not enforce_torque_enabled)
|
||||
self._torque_control_toggle.action_item.set_enabled(ui_state.is_offroad() and torque_allowed and not nnlc_enabled)
|
||||
self._torque_customization_button.action_item.set_enabled(self._torque_control_toggle.action_item.get_state())
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -150,6 +150,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)
|
||||
@@ -179,10 +180,6 @@ class UIStateSP:
|
||||
CP = self.CP
|
||||
|
||||
if CP is not None:
|
||||
if self.params.get_bool("EnforceTorqueControl") and self.params.get_bool("NeuralNetworkLateralControl"):
|
||||
self.params.put_bool("EnforceTorqueControl", False, block=True)
|
||||
self.params.put_bool("NeuralNetworkLateralControl", False, block=True)
|
||||
|
||||
# Angle steering: no torque-based lateral controls
|
||||
if CP.steerControlType == car.CarParams.SteerControlType.angle:
|
||||
self.params.remove("EnforceTorqueControl")
|
||||
|
||||
@@ -1296,6 +1296,12 @@
|
||||
"title": "Display Turn Signals",
|
||||
"description": "When enabled, visual turn indicators are drawn on the HUD."
|
||||
},
|
||||
{
|
||||
"key": "HideCamera",
|
||||
"widget": "toggle",
|
||||
"title": "Hide Camera",
|
||||
"description": "Hide the camera live view from the driving screen."
|
||||
},
|
||||
{
|
||||
"key": "RoadNameToggle",
|
||||
"widget": "toggle",
|
||||
|
||||
@@ -24,6 +24,10 @@ sections:
|
||||
widget: toggle
|
||||
title: Display Turn Signals
|
||||
description: When enabled, visual turn indicators are drawn on the HUD.
|
||||
- key: HideCamera
|
||||
widget: toggle
|
||||
title: Hide Camera
|
||||
description: Hide the camera live view from the driving screen.
|
||||
- key: RoadNameToggle
|
||||
widget: toggle
|
||||
title: Display Road Name
|
||||
|
||||
Reference in New Issue
Block a user