移除 Joystick Debug Mode 和 Longitudinal Maneuver Mode

This commit is contained in:
mawei
2026-06-28 15:30:54 +08:00
parent c51e8d6b10
commit a945f79e7d
2 changed files with 5 additions and 55 deletions
+3 -14
View File
@@ -4,10 +4,9 @@ Mirror of upstream openpilot's DeveloperLayout settings for the dashy web UI.
See openpilot.toggles.py for the rationale (DASHY-gated, no param_type, etc.).
Notes:
- AlphaLongitudinalEnabled / JoystickDebugMode / LongitudinalManeuverMode are
hidden on release builds in the device UI (DeveloperLayout._update_toggles).
Mirror them with `condition: "DASHY and not IS_RELEASE"` so release-branch
dashy hides them too.
- AlphaLongitudinalEnabled is hidden on release builds in the device UI
(DeveloperLayout._update_toggles). Mirror with
`condition: "DASHY and not IS_RELEASE"` so release-branch dashy hides it too.
- SSH Keys: rendered as a text_input (GithubUsername) + text_display
(GithubSshKeys) + clear button. The actual github.com fetch is handled by
the dashy action endpoint /api/action/ssh_key_set since it has side effects
@@ -35,16 +34,6 @@ ITEMS = [
"title": lambda: tr("Enable SSH"),
"condition": _DASHY,
},
{
"section": _SEC, "key": "JoystickDebugMode", "type": "toggle_item",
"title": lambda: tr("Joystick Debug Mode"),
"condition": _DASHY_ALPHA,
},
{
"section": _SEC, "key": "LongitudinalManeuverMode", "type": "toggle_item",
"title": lambda: tr("Longitudinal Maneuver Mode"),
"condition": _DASHY_ALPHA,
},
{
"section": _SEC, "key": "AlphaLongitudinalEnabled", "type": "toggle_item",
"title": lambda: tr("openpilot Longitudinal Control (Alpha)"),
+2 -41
View File
@@ -58,21 +58,6 @@ class DeveloperLayout(Widget):
)
self._ssh_keys = ssh_key_item(lambda: tr("SSH Keys"), description=lambda: tr(DESCRIPTIONS["ssh_key"]))
self._joystick_toggle = toggle_item(
lambda: tr("Joystick Debug Mode"),
description="",
initial_state=self._params.get_bool("JoystickDebugMode"),
callback=self._on_joystick_debug_mode,
enabled=ui_state.is_offroad,
)
self._long_maneuver_toggle = toggle_item(
lambda: tr("Longitudinal Maneuver Mode"),
description="",
initial_state=self._params.get_bool("LongitudinalManeuverMode"),
callback=self._on_long_maneuver_mode,
)
self._lat_maneuver_toggle = toggle_item(
lambda: tr("Lateral Maneuver Mode"),
description="",
@@ -100,8 +85,6 @@ class DeveloperLayout(Widget):
self._adb_toggle,
self._ssh_toggle,
self._ssh_keys,
self._joystick_toggle,
self._long_maneuver_toggle,
self._lat_maneuver_toggle,
self._alpha_long_toggle,
self._ui_debug_toggle,
@@ -124,7 +107,7 @@ class DeveloperLayout(Widget):
# Hide non-release toggles on release builds
# TODO: we can do an onroad cycle, but alpha long toggle requires a deinit function to re-enable radar and not fault
for item in (self._joystick_toggle, self._long_maneuver_toggle, self._lat_maneuver_toggle, self._alpha_long_toggle):
for item in (self._lat_maneuver_toggle, self._alpha_long_toggle):
item.set_visible(not self._is_release)
# CP gating
@@ -136,10 +119,8 @@ class DeveloperLayout(Widget):
else:
self._alpha_long_toggle.set_visible(True)
long_man_enabled = ui_state.has_longitudinal_control and ui_state.is_offroad()
self._long_maneuver_toggle.action_item.set_enabled(long_man_enabled)
pass
else:
self._long_maneuver_toggle.action_item.set_enabled(False)
self._lat_maneuver_toggle.action_item.set_enabled(False)
self._alpha_long_toggle.set_visible(False)
@@ -148,8 +129,6 @@ class DeveloperLayout(Widget):
for key, item in (
("AdbEnabled", self._adb_toggle),
("SshEnabled", self._ssh_toggle),
("JoystickDebugMode", self._joystick_toggle),
("LongitudinalManeuverMode", self._long_maneuver_toggle),
("LateralManeuverMode", self._lat_maneuver_toggle),
("AlphaLongitudinalEnabled", self._alpha_long_toggle),
("ShowDebugInfo", self._ui_debug_toggle),
@@ -167,27 +146,9 @@ class DeveloperLayout(Widget):
def _on_enable_ssh(self, state: bool):
self._params.put_bool("SshEnabled", state, block=True)
def _on_joystick_debug_mode(self, state: bool):
self._params.put_bool("JoystickDebugMode", state, block=True)
self._params.put_bool("LongitudinalManeuverMode", False, block=True)
self._long_maneuver_toggle.action_item.set_state(False)
self._params.put_bool("LateralManeuverMode", False, block=True)
self._lat_maneuver_toggle.action_item.set_state(False)
def _on_long_maneuver_mode(self, state: bool):
self._params.put_bool("LongitudinalManeuverMode", state, block=True)
self._params.put_bool("JoystickDebugMode", False, block=True)
self._joystick_toggle.action_item.set_state(False)
self._params.put_bool("LateralManeuverMode", False, block=True)
self._lat_maneuver_toggle.action_item.set_state(False)
def _on_lat_maneuver_mode(self, state: bool):
self._params.put_bool("LateralManeuverMode", state, block=True)
self._params.put_bool("ExperimentalMode", False, block=True)
self._params.put_bool("JoystickDebugMode", False, block=True)
self._joystick_toggle.action_item.set_state(False)
self._params.put_bool("LongitudinalManeuverMode", False, block=True)
self._long_maneuver_toggle.action_item.set_state(False)
def _on_alpha_long_enabled(self, state: bool):
if state: