Keep Redneck Cruise in Galaxy developer settings

This commit is contained in:
firestar5683
2026-08-07 11:36:15 -05:00
parent 332dfdf099
commit 32117d43bc
6 changed files with 14 additions and 24 deletions
@@ -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)
-3
View File
@@ -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
@@ -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,