ui: Implement core device settings functionality with enhanced dynamic controls (#35507)

* implement device settings functionality with power controls

* format

* Update selfdrive/ui/layouts/settings/device.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Update selfdrive/ui/layouts/settings/device.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* add comment back

* add comments back

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
This commit is contained in:
Dean Lee
2025-06-10 05:45:29 +08:00
committed by GitHub
parent d3b300a148
commit 61b8f6f478
3 changed files with 178 additions and 56 deletions
+6
View File
@@ -66,6 +66,12 @@ class UIState:
def engaged(self) -> bool:
return self.started and self.sm["selfdriveState"].enabled
def is_onroad(self) -> bool:
return self.started
def is_offroad(self) -> bool:
return not self.started
def update(self) -> None:
self.sm.update(0)
self._update_state()