mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-23 15:23:46 +08:00
schema: convert ShowAdvancedControls visibility to enablement
Items previously hidden when ShowAdvancedControls is off now render as disabled with an ADVANCED tooltip. Same treatment for dependency- based hides (LagdToggleDelay, LaneTurnValue) so users see what's available and why it's locked. CameraOffset gets the Advanced gate it was missing. Affected: DisableUpdates, EnableGithubRunner, EnableCopyparty, QuickBootToggle, LaneTurnValue, LagdToggleDelay, CameraOffset, and the test_maneuvers section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1627,18 +1627,16 @@
|
||||
{
|
||||
"key": "DisableUpdates",
|
||||
"widget": "toggle",
|
||||
"visibility": [
|
||||
"enablement": [
|
||||
{
|
||||
"type": "offroad_only"
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
],
|
||||
"enablement": [
|
||||
{
|
||||
"type": "offroad_only"
|
||||
}
|
||||
],
|
||||
"title": "Disable Updates",
|
||||
"description": "When enabled, automatic software updates will be off. This requires a reboot to take effect."
|
||||
}
|
||||
@@ -1770,19 +1768,26 @@
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "all",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_sp_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
"type": "capability",
|
||||
"field": "is_sp_release",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"enablement": [
|
||||
{
|
||||
"type": "any",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_development",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1841,32 +1846,29 @@
|
||||
"description": "Enables or disables the GitHub runner service.",
|
||||
"visibility": [
|
||||
{
|
||||
"type": "all",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "not",
|
||||
"condition": {
|
||||
"type": "any",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_sp_release",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
"type": "not",
|
||||
"condition": {
|
||||
"type": "any",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_sp_release",
|
||||
"equals": true
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"enablement": [
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1875,7 +1877,7 @@
|
||||
"widget": "toggle",
|
||||
"title": "copyparty Service",
|
||||
"description": "copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via its IP address.",
|
||||
"visibility": [
|
||||
"enablement": [
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
@@ -1888,37 +1890,27 @@
|
||||
"widget": "toggle",
|
||||
"visibility": [
|
||||
{
|
||||
"type": "all",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "not",
|
||||
"condition": {
|
||||
"type": "any",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_sp_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_development",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
"type": "not",
|
||||
"condition": {
|
||||
"type": "any",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_sp_release",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "capability",
|
||||
"field": "is_development",
|
||||
"equals": true
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"enablement": [
|
||||
@@ -1926,6 +1918,11 @@
|
||||
"type": "param",
|
||||
"key": "DisableUpdates",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
],
|
||||
"title": "Quickboot Mode"
|
||||
@@ -1965,21 +1962,16 @@
|
||||
"metric": "km/h",
|
||||
"imperial": "mph"
|
||||
},
|
||||
"visibility": [
|
||||
"enablement": [
|
||||
{
|
||||
"type": "all",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "param",
|
||||
"key": "LaneTurnDesire",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
"type": "param",
|
||||
"key": "LaneTurnDesire",
|
||||
"equals": true
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1997,24 +1989,19 @@
|
||||
"min": 0.05,
|
||||
"max": 0.5,
|
||||
"step": 0.01,
|
||||
"visibility": [
|
||||
"enablement": [
|
||||
{
|
||||
"type": "all",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "not",
|
||||
"condition": {
|
||||
"type": "param",
|
||||
"key": "LagdToggle",
|
||||
"equals": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
"type": "not",
|
||||
"condition": {
|
||||
"type": "param",
|
||||
"key": "LagdToggle",
|
||||
"equals": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2071,7 +2058,14 @@
|
||||
"min": -0.35,
|
||||
"max": 0.35,
|
||||
"step": 0.01,
|
||||
"unit": "meters"
|
||||
"unit": "meters",
|
||||
"enablement": [
|
||||
{
|
||||
"type": "param",
|
||||
"key": "ShowAdvancedControls",
|
||||
"equals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user