pedals in galaxy

This commit is contained in:
firestar5683
2026-07-03 13:43:59 -05:00
parent d98ae2b94b
commit 957fe8af75
2 changed files with 33 additions and 0 deletions
@@ -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",
+16
View File
@@ -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)