BigUI WIP: Vehicle Panel state update

This commit is contained in:
firestarsdog
2026-06-05 14:58:28 -04:00
parent 826775bb1f
commit 980c85cfb1
2 changed files with 4 additions and 6 deletions
@@ -648,6 +648,7 @@ class StarPilotVehicleSettingsLayout(_SettingsPage):
if current_model not in available:
self._params.remove("CarModel")
self._params.remove("CarModelName")
starpilot_state.update()
dialog = MultiOptionDialog(tr("Select Make"), makes, default_make, callback=on_select)
gui_app.push_widget(dialog)
@@ -675,6 +676,7 @@ class StarPilotVehicleSettingsLayout(_SettingsPage):
self._params.put("CarModel", opt.value)
self._params.put("CarModelName", opt.label)
self._params.put("CarMake", make)
starpilot_state.update()
dialog = MultiOptionDialog(tr("Select Model"), option_labels, default_option, callback=on_select)
gui_app.push_widget(dialog)
+2 -6
View File
@@ -77,12 +77,8 @@ class StarPilotState:
self.update()
def _apply_desktop_fallback(self, starpilot_toggles: dict):
fallback_make = starpilot_toggles.get("car_make", "")
fallback_model = starpilot_toggles.get("car_model", "")
if not fallback_make:
fallback_make = "gm"
if not fallback_model:
fallback_model = "CHEVROLET_BOLT_ACC_2022_2023"
fallback_make = starpilot_toggles.get("car_make") or self.params.get("CarMake", encoding="utf-8") or "gm"
fallback_model = starpilot_toggles.get("car_model") or self.params.get("CarModel", encoding="utf-8") or "CHEVROLET_BOLT_ACC_2022_2023"
self.car_state.hasModeStarButtons = self.car_state.isHKGCanFd
self.car_state.hasPedal = starpilot_toggles.get("has_pedal", True)