From 80cb726a82468b4da4825b3f8b6969ca64d42c5f Mon Sep 17 00:00:00 2001 From: mawei Date: Mon, 29 Jun 2026 09:30:56 +0800 Subject: [PATCH] settings: remove DisengageOnAccelerator & AlwaysOnDM toggles --- dragonpilot/settings/openpilot.toggles.py | 12 ------------ selfdrive/ui/layouts/settings/toggles.py | 18 ++---------------- selfdrive/ui/mici/layouts/settings/toggles.py | 3 --- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/dragonpilot/settings/openpilot.toggles.py b/dragonpilot/settings/openpilot.toggles.py index 835dd1016..b9140398a 100644 --- a/dragonpilot/settings/openpilot.toggles.py +++ b/dragonpilot/settings/openpilot.toggles.py @@ -33,24 +33,12 @@ ITEMS = [ "title": lambda: tr("Experimental Mode"), "condition": _DASHY, }, - { - "section": _SEC, "key": "DisengageOnAccelerator", "type": "toggle_item", - "title": lambda: tr("Disengage on Accelerator Pedal"), - "description": lambda: tr(_TOGGLES_DESC["DisengageOnAccelerator"]), - "condition": _DASHY, - }, { "section": _SEC, "key": "IsLdwEnabled", "type": "toggle_item", "title": lambda: tr("Enable Lane Departure Warnings"), "description": lambda: tr(_TOGGLES_DESC["IsLdwEnabled"]), "condition": _DASHY, }, - { - "section": _SEC, "key": "AlwaysOnDM", "type": "toggle_item", - "title": lambda: tr("Always-On Driver Monitoring"), - "description": lambda: tr(_TOGGLES_DESC["AlwaysOnDM"]), - "condition": _DASHY, - }, { "section": _SEC, "key": "RecordFront", "type": "toggle_item", "title": lambda: tr("Record and Upload Driver Camera"), diff --git a/selfdrive/ui/layouts/settings/toggles.py b/selfdrive/ui/layouts/settings/toggles.py index 15382115d..5e391d8e4 100644 --- a/selfdrive/ui/layouts/settings/toggles.py +++ b/selfdrive/ui/layouts/settings/toggles.py @@ -20,7 +20,6 @@ DESCRIPTIONS = { "Use the openpilot system for adaptive cruise control and lane keep driver assistance. " + "Your attention is required at all times to use this feature." ), - "DisengageOnAccelerator": tr_noop("When enabled, pressing the accelerator pedal will disengage openpilot."), "LongitudinalPersonality": tr_noop( "Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. " + "In relaxed mode openpilot will stay further away from lead cars. On supported cars, you can cycle through these personalities with " + @@ -30,7 +29,6 @@ DESCRIPTIONS = { "Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line " + "without a turn signal activated while driving over 31 mph (50 km/h)." ), - "AlwaysOnDM": tr_noop("Enable driver monitoring even when openpilot is not engaged."), 'RecordFront': tr_noop("Upload data from the driver facing camera and help improve the driver monitoring algorithm."), "IsMetric": tr_noop("Display speed in km/h instead of mph."), "RecordAudio": tr_noop("Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect."), @@ -59,24 +57,12 @@ class TogglesLayout(Widget): "experimental_white.png", False, ), - "DisengageOnAccelerator": ( - lambda: tr("Disengage on Accelerator Pedal"), - DESCRIPTIONS["DisengageOnAccelerator"], - "disengage_on_accelerator.png", - False, - ), "IsLdwEnabled": ( lambda: tr("Enable Lane Departure Warnings"), DESCRIPTIONS["IsLdwEnabled"], "warning.png", False, ), - "AlwaysOnDM": ( - lambda: tr("Always-On Driver Monitoring"), - DESCRIPTIONS["AlwaysOnDM"], - "monitoring.png", - False, - ), "RecordFront": ( lambda: tr("Record and Upload Driver Camera"), DESCRIPTIONS["RecordFront"], @@ -153,8 +139,8 @@ class TogglesLayout(Widget): self._toggles[param] = toggle - # insert longitudinal personality after NDOG toggle - if param == "DisengageOnAccelerator": + # insert longitudinal personality after LDW toggle + if param == "IsLdwEnabled": self._toggles["LongitudinalPersonality"] = self._long_personality_setting self._update_experimental_mode_icon() diff --git a/selfdrive/ui/mici/layouts/settings/toggles.py b/selfdrive/ui/mici/layouts/settings/toggles.py index acb502fda..c8a8b7add 100644 --- a/selfdrive/ui/mici/layouts/settings/toggles.py +++ b/selfdrive/ui/mici/layouts/settings/toggles.py @@ -17,7 +17,6 @@ class TogglesLayoutMici(NavScroller): self._experimental_btn = BigParamControl("experimental mode", "ExperimentalMode") is_metric_toggle = BigParamControl("use metric units", "IsMetric") ldw_toggle = BigParamControl("lane departure warnings", "IsLdwEnabled") - always_on_dm_toggle = BigParamControl("always-on driver monitor", "AlwaysOnDM") record_front = BigParamControl("record & upload driver camera", "RecordFront", toggle_callback=restart_needed_callback) record_mic = BigParamControl("record & upload mic audio", "RecordAudio", toggle_callback=restart_needed_callback) enable_openpilot = BigParamControl("enable openpilot", "OpenpilotEnabledToggle", toggle_callback=restart_needed_callback) @@ -27,7 +26,6 @@ class TogglesLayoutMici(NavScroller): self._experimental_btn, is_metric_toggle, ldw_toggle, - always_on_dm_toggle, record_front, record_mic, enable_openpilot, @@ -38,7 +36,6 @@ class TogglesLayoutMici(NavScroller): ("ExperimentalMode", self._experimental_btn), ("IsMetric", is_metric_toggle), ("IsLdwEnabled", ldw_toggle), - ("AlwaysOnDM", always_on_dm_toggle), ("RecordFront", record_front), ("RecordAudio", record_mic), ("OpenpilotEnabledToggle", enable_openpilot),