restart_needed_callback takes no args

This commit is contained in:
Shane Smiskol
2026-05-04 16:37:15 -07:00
parent 94cf600bfe
commit 1caae26cfc
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
from openpilot.selfdrive.ui.ui_state import ui_state
def restart_needed_callback(_):
def restart_needed_callback(_=None):
ui_state.params.put_bool("OnroadCycleRequested", True)
@@ -174,7 +174,7 @@ class DeveloperLayoutMici(NavScroller):
self._joystick_toggle.set_checked(False)
ui_state.params.put_bool("LateralManeuverMode", False)
self._lat_maneuver_toggle.set_checked(False)
restart_needed_callback(state)
restart_needed_callback()
def _on_lat_maneuver_mode(self, state: bool):
ui_state.params.put_bool("LateralManeuverMode", state)
@@ -183,12 +183,12 @@ class DeveloperLayoutMici(NavScroller):
self._joystick_toggle.set_checked(False)
ui_state.params.put_bool("LongitudinalManeuverMode", False)
self._long_maneuver_toggle.set_checked(False)
restart_needed_callback(state)
restart_needed_callback()
def _on_alpha_long_enabled(self, state: bool):
def do_toggle(_state: bool):
ui_state.params.put_bool("AlphaLongitudinalEnabled", _state)
restart_needed_callback(True)
restart_needed_callback()
self._update_toggles()
if state: