diff --git a/starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json b/starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json index a578ecc54..1fda6448c 100644 --- a/starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json +++ b/starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json @@ -1903,8 +1903,25 @@ "description": "On-screen gas and brake indicators.\n\nDynamic: Opacity changes according to how much openpilot is accelerating or braking\nStatic: Full when active, dim when not", "data_type": "bool", "ui_type": "toggle", + "is_parent_toggle": true, "parent_key": "CustomUI" }, + { + "key": "DynamicPedalsOnUI", + "label": "Dynamic", + "description": "Fade the gas and brake indicators based on how much openpilot is accelerating or braking.", + "data_type": "bool", + "ui_type": "toggle", + "parent_key": "PedalsOnUI" + }, + { + "key": "StaticPedalsOnUI", + "label": "Static", + "description": "Show full-strength gas and brake indicators when active, and dim them when inactive.", + "data_type": "bool", + "ui_type": "toggle", + "parent_key": "PedalsOnUI" + }, { "key": "RotatingWheel", "label": "Rotating Steering Wheel", diff --git a/starpilot/system/the_galaxy/the_galaxy.py b/starpilot/system/the_galaxy/the_galaxy.py index df2f99218..af2e1a10c 100644 --- a/starpilot/system/the_galaxy/the_galaxy.py +++ b/starpilot/system/the_galaxy/the_galaxy.py @@ -4004,6 +4004,22 @@ def setup(app): "updated": updated, }), 200 + if key in {"DynamicPedalsOnUI", "StaticPedalsOnUI"}: + enabled = str_val.strip() in ("1", "true", "True") + params.put_bool(key, enabled) + + updated = {key: enabled} + if enabled: + other_key = "StaticPedalsOnUI" if key == "DynamicPedalsOnUI" else "DynamicPedalsOnUI" + params.put_bool(other_key, False) + updated[other_key] = False + + update_starpilot_toggles() + return jsonify({ + "message": f"Parameter '{key}' updated successfully.", + "updated": updated, + }), 200 + if key in {"ConditionalExperimental", "ConditionalChill"}: enabled = str_val.strip() in ("1", "true", "True") params.put_bool(key, enabled)