mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-06 00:36:25 +08:00
Drain The Swamp
This commit is contained in:
@@ -5,7 +5,7 @@ derive_feasible_params.py
|
||||
Dynamically parses the OpenPilot/StarPilot codebase to cross-reference logically
|
||||
registered Param keys with UI string literals. This ensures that no hidden or
|
||||
dynamically-instantiated UI toggles are missed, outputting a highly accurate "Golden List"
|
||||
of parameters that can be safely modified by The Pond or other configuration interfaces.
|
||||
of parameters that can be safely modified by The Galaxy or other configuration interfaces.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
@@ -24,7 +24,7 @@ DROPDOWN_MAPPING = {
|
||||
}
|
||||
|
||||
# Custom controls implemented outside the tuple vectors in Qt settings panels.
|
||||
# Inject these so regenerated pond layouts retain equivalent functionality.
|
||||
# Inject these so regenerated galaxy layouts retain equivalent functionality.
|
||||
INJECTED_SECTION_PARAMS = {
|
||||
"Vehicle": [
|
||||
{
|
||||
@@ -60,7 +60,7 @@ INJECTED_SECTION_PARAMS = {
|
||||
],
|
||||
}
|
||||
|
||||
# Keys explicitly hidden from The Pond's generic settings UI.
|
||||
# Keys explicitly hidden from The Galaxy's generic settings UI.
|
||||
HIDDEN_KEYS = {
|
||||
"FrogsGoMoosTweak",
|
||||
"LockDoorsTimer",
|
||||
@@ -472,7 +472,7 @@ def parse_cpp_file(filename):
|
||||
if data_type == "float" and step and float(step).is_integer():
|
||||
data_type = "int"
|
||||
|
||||
# Generic pond UI can't faithfully represent non-boolean button/multi-option controls.
|
||||
# Generic galaxy UI can't faithfully represent non-boolean button/multi-option controls.
|
||||
if widget_type == "toggle" and data_type != "bool":
|
||||
continue
|
||||
|
||||
@@ -609,7 +609,7 @@ def main():
|
||||
"icon": cat["icon"],
|
||||
"params": items
|
||||
})
|
||||
output_path = os.path.join(REPO_ROOT, "starpilot/system/the_pond/assets/components/tools/device_settings_layout.json")
|
||||
output_path = os.path.join(REPO_ROOT, "starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json")
|
||||
layout = generated_layout
|
||||
if os.path.exists(output_path):
|
||||
with open(output_path, 'r', encoding='utf-8') as f:
|
||||
@@ -199,7 +199,7 @@ def main():
|
||||
"uiText2": "Set target speed and let lateral stabilize.",
|
||||
"updatedAtSec": time.monotonic(),
|
||||
})
|
||||
_append_history(status, "Armed from The Pond. Stabilize on a straight, flat road to start.")
|
||||
_append_history(status, "Armed from The Galaxy. Stabilize on a straight, flat road to start.")
|
||||
|
||||
last_status_signature = ""
|
||||
last_status_write = 0.0
|
||||
|
||||
Reference in New Issue
Block a user