From 32117d43bce4cd78d2df5ffc4289caed1cb7f5a1 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:36:15 -0500 Subject: [PATCH] Keep Redneck Cruise in Galaxy developer settings --- scripts/diagnose_slc_mapd.py | 5 ++--- selfdrive/ui/layouts/settings/starpilot/vehicle.py | 13 ------------- selfdrive/ui/lib/starpilot_state.py | 3 --- selfdrive/ui/mici/layouts/settings/vehicle.py | 6 +----- .../components/tools/device_settings_layout.json | 9 +++++++++ .../the_galaxy/tests/test_device_settings_layout.py | 2 ++ 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/scripts/diagnose_slc_mapd.py b/scripts/diagnose_slc_mapd.py index d11773545..8b7a99973 100644 --- a/scripts/diagnose_slc_mapd.py +++ b/scripts/diagnose_slc_mapd.py @@ -55,7 +55,7 @@ from openpilot.tools.lib.logreader import LogReader, ReadMode # Constants # ============================================================================ -OVERPASS_API_URL = "https://maps.mail.ru/osm/tools/overpass/api/interpreter" +OVERPASS_API_URL = "https://overpass-api.de/api/interpreter" OVERPASS_UA = "starpilot-diagnose-slc/1.0 (https://github.com/FrogAi/StarPilot)" JWT_HELP_URL = "https://jwt.comma.ai/" @@ -672,8 +672,7 @@ class OverpassClient: if not gps: return {} - cache_input = {"endpoint": OVERPASS_API_URL, "gps": gps} - key = hashlib.sha256(json.dumps(cache_input, sort_keys=True).encode()).hexdigest()[:16] + key = hashlib.sha256(json.dumps(gps, sort_keys=True).encode()).hexdigest()[:16] cached = self._load_cache(key) if cached is not None: return cached diff --git a/selfdrive/ui/layouts/settings/starpilot/vehicle.py b/selfdrive/ui/layouts/settings/starpilot/vehicle.py index 905f34eff..c9e8c7b68 100644 --- a/selfdrive/ui/layouts/settings/starpilot/vehicle.py +++ b/selfdrive/ui/layouts/settings/starpilot/vehicle.py @@ -46,7 +46,6 @@ from openpilot.selfdrive.ui.lib.fingerprint_catalog import ( shorten_model_label, ) from openpilot.starpilot.common.starpilot_variables import migrate_cancel_button_controls -from openpilot.selfdrive.ui.layouts.settings.common import restart_needed_callback ACTION_OPTIONS = [ @@ -421,13 +420,6 @@ class VehicleSettingsManagerView(PanelManagerView): "get_state": lambda: self._controller._params.get_bool("NostalgiaMode"), "set_state": lambda s: self._controller._on_toggle("NostalgiaMode"), }) - if cs.redneckCruiseAvailable: - toggles.append({ - "title": tr("Redneck Cruise"), - "subtitle": tr("Use RES/SET button presses to match the stock cruise set speed to StarPilot's target."), - "get_state": lambda: self._controller._params.get_bool("RedneckCruise"), - "set_state": lambda s: self._controller._on_toggle("RedneckCruise"), - }) return toggles @@ -687,11 +679,6 @@ class StarPilotVehicleSettingsLayout(_SettingsPage): migrate_cancel_button_controls(self._params) starpilot_state.update(force=True) return - if param_key == "RedneckCruise": - self._params.put_bool("RedneckCruise", not self._params.get_bool("RedneckCruise")) - starpilot_state.update(force=True) - restart_needed_callback(None) - return current = self._params.get_bool(param_key) if self._params.get(param_key) is not None else False self._params.put_bool(param_key, not current) starpilot_state.update(force=True) diff --git a/selfdrive/ui/lib/starpilot_state.py b/selfdrive/ui/lib/starpilot_state.py index c1430b089..c03aa1257 100644 --- a/selfdrive/ui/lib/starpilot_state.py +++ b/selfdrive/ui/lib/starpilot_state.py @@ -38,7 +38,6 @@ class StarPilotCarState: hasZSS: bool = False canUsePedal: bool = False canUseSDSU: bool = False - redneckCruiseAvailable: bool = False # ========== Device/Car State ========== isFrogsGoMoo: bool = False @@ -207,14 +206,12 @@ class StarPilotState: # 2. Parse StarPilotCarParamsPersistent fpcp_bytes = self.params.get("StarPilotCarParamsPersistent") - self.car_state.redneckCruiseAvailable = False if fpcp_bytes is not None: try: FPCP = messaging.log_from_bytes(fpcp_bytes, custom.StarPilotCarParams) self.car_state.canUsePedal = FPCP.canUsePedal self.car_state.canUseSDSU = FPCP.canUseSDSU self.car_state.openpilotLongitudinalControlDisabled = FPCP.openpilotLongitudinalControlDisabled - self.car_state.redneckCruiseAvailable = bool(FPCP.redneckCruiseAvailable) except Exception: pass diff --git a/selfdrive/ui/mici/layouts/settings/vehicle.py b/selfdrive/ui/mici/layouts/settings/vehicle.py index f3706cc06..3c20c952e 100644 --- a/selfdrive/ui/mici/layouts/settings/vehicle.py +++ b/selfdrive/ui/mici/layouts/settings/vehicle.py @@ -9,7 +9,6 @@ from openpilot.selfdrive.ui.lib.fingerprint_catalog import ( shorten_model_label, ) from openpilot.selfdrive.ui.layouts.settings.common import restart_needed_callback -from openpilot.selfdrive.ui.lib.starpilot_state import starpilot_state from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.lib.multilang import tr @@ -196,10 +195,7 @@ class VehicleLayoutMici(NavScroller): fingerprint_btn = BigButton("fingerprint", "",gui_app.texture("icons_mici/settings/vehicle/fingerprint.png", 58, 64)) fingerprint_btn.set_click_callback(lambda: gui_app.push_widget(fingerprint_panel)) - starpilot_state.update(force=True) - vehicle_specific_widgets = ( - BigParamControl("redneck cruise", "RedneckCruise", toggle_callback=restart_needed_callback), - ) if starpilot_state.car_state.redneckCruiseAvailable else tuple() + vehicle_specific_widgets = tuple() self._scroller.add_widgets([ fingerprint_btn, 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 b09e8aec9..e8b3185f3 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 @@ -4066,6 +4066,15 @@ "ui_type": "toggle", "settings_tier": "simple" }, + { + "key": "RedneckCruise", + "label": "Redneck Cruise", + "description": "On supported Hyundai stock-cruise cars, use RES/SET button presses to match the cluster set speed to StarPilot's target.", + "data_type": "bool", + "ui_type": "toggle", + "parent_key": "GalaxyDeveloperMode", + "settings_tier": "advanced" + }, { "key": "UseOldUI", "label": "Use Old UI", diff --git a/starpilot/system/the_galaxy/tests/test_device_settings_layout.py b/starpilot/system/the_galaxy/tests/test_device_settings_layout.py index 36907b95e..e5fc44640 100644 --- a/starpilot/system/the_galaxy/tests/test_device_settings_layout.py +++ b/starpilot/system/the_galaxy/tests/test_device_settings_layout.py @@ -51,6 +51,7 @@ def test_galaxy_layout_contains_basic_mode_controls(): "QOLLongitudinal", } <= sections["Longitudinal (Speed & Following)"].keys() assert "RedneckCruise" not in sections["Longitudinal (Speed & Following)"].keys() + assert sections["Developer"]["RedneckCruise"]["parent_key"] == "GalaxyDeveloperMode" assert {"GalaxyDeveloperMode", "UseOldUI"} <= sections["Developer"].keys() @@ -121,6 +122,7 @@ def test_requested_simple_and_advanced_settings_tiers(): assert developer["GalaxyDeveloperMode"]["settings_tier"] == "simple" assert developer["UseOldUI"]["settings_tier"] == "simple" assert developer["DeveloperUI"]["settings_tier"] == "advanced" + assert developer["RedneckCruise"]["settings_tier"] == "advanced" def test_hidden_feature_defaults_remain_enabled():