mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 21:12:07 +08:00
cefddf4b9b
* initial * start to support nav stack in settings panels + fix some navwidget bugs * add deprecation warning and move more to new nav stack * fix overriding NavWidget enabled and do developer panel * fix interactive timeout and do main * more device, not done yet * minor network fixes * dcam dialog * start onboarding * fix onboarding * do mici setup * remove now useless CUSTOM_SOFTWARE * support big ui with old modal overlay * reset can be old modal overlay, but updater needs new since it uses wifiui * flip name truthiness to inspire excitement * all *should* work, but will do pass later * clean up main * clean up settiings * clean up dialog and developer * cleanup mici setup some * rm one more * fix keyboard * revert * might as well but clarify * fix networkinfopage buttons * lint * nice clean up from cursor * animate background fade with position * fix device overlays * cursor fix pt1 cursor fix pt2 * rm print * capital * temp fix from cursor for onboarding not freeing space after reviewing training guide * fix home screen scroller snap not resetting * stash * nice gradient on top * 40 * 20 * no gradient * return unused returns and always show regulatory btn * nice! * revert selfdrive/ui * let's do tici first * bring back ui * not sure why __del__, SetupWidget was never deleted? * device "done" * network "done!!" * toggles "done" * software "done" * developer "done" * fix onboarding * use new modal for debug windows * and aug * setup "done" * clean up * updater "done" * reset "done" * pop first before callbacks in case callbacks push * fix cmt * not needed * remove two commented functions for mici * clean up application * typing * static * not sure what this means * fix big * more static * actually great catch * fix cmt
43 lines
1.1 KiB
Python
Executable File
43 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import pyray as rl
|
|
|
|
from openpilot.system.hardware import TICI
|
|
from openpilot.common.realtime import config_realtime_process, set_core_affinity
|
|
from openpilot.system.ui.lib.application import gui_app
|
|
from openpilot.selfdrive.ui.layouts.main import MainLayout
|
|
from openpilot.selfdrive.ui.mici.layouts.main import MiciMainLayout
|
|
from openpilot.selfdrive.ui.ui_state import ui_state
|
|
|
|
BIG_UI = gui_app.big_ui()
|
|
|
|
|
|
def main():
|
|
cores = {5, }
|
|
config_realtime_process(0, 51)
|
|
|
|
if BIG_UI:
|
|
gui_app.init_window("UI", new_modal=True)
|
|
main_layout = MainLayout()
|
|
else:
|
|
gui_app.init_window("UI")
|
|
main_layout = MiciMainLayout()
|
|
main_layout.set_rect(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
|
|
|
|
for should_render in gui_app.render():
|
|
ui_state.update()
|
|
if should_render:
|
|
if not BIG_UI:
|
|
main_layout.render()
|
|
|
|
# reaffine after power save offlines our core
|
|
if TICI and os.sched_getaffinity(0) != cores:
|
|
try:
|
|
set_core_affinity(list(cores))
|
|
except OSError:
|
|
pass
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|