mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 05:24:06 +08:00
* add new main UI entry point * cleanup * mv to selfdrive/ui * fix imports * handle_mouse_click * use ui_state * remove ui_state from gui_app * setup callbacks * handle clicks * put layouts in a dict * update state in render * rebase master * implement settings sidebar * rename files
21 lines
495 B
Python
Executable File
21 lines
495 B
Python
Executable File
#!/usr/bin/env python3
|
|
import pyray as rl
|
|
from openpilot.system.ui.lib.application import gui_app
|
|
from openpilot.selfdrive.ui.layouts.main import MainLayout
|
|
from openpilot.selfdrive.ui.ui_state import ui_state
|
|
|
|
|
|
def main():
|
|
gui_app.init_window("UI")
|
|
main_layout = MainLayout()
|
|
for _ in gui_app.render():
|
|
ui_state.update()
|
|
|
|
#TODO handle brigntness and awake state here
|
|
|
|
main_layout.render(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|