|
|
|
@ -1,14 +1,16 @@ |
|
|
|
#!/usr/bin/env python3 |
|
|
|
#!/usr/bin/env python3 |
|
|
|
|
|
|
|
import os |
|
|
|
import pyray as rl |
|
|
|
import pyray as rl |
|
|
|
|
|
|
|
|
|
|
|
from openpilot.common.realtime import config_realtime_process |
|
|
|
from openpilot.common.realtime import config_realtime_process, set_core_affinity |
|
|
|
from openpilot.system.ui.lib.application import gui_app |
|
|
|
from openpilot.system.ui.lib.application import gui_app |
|
|
|
from openpilot.selfdrive.ui.layouts.main import MainLayout |
|
|
|
from openpilot.selfdrive.ui.layouts.main import MainLayout |
|
|
|
from openpilot.selfdrive.ui.ui_state import ui_state |
|
|
|
from openpilot.selfdrive.ui.ui_state import ui_state |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|
config_realtime_process([1, 2], 1) |
|
|
|
cores = {7, } |
|
|
|
|
|
|
|
config_realtime_process(0, 1) |
|
|
|
|
|
|
|
|
|
|
|
gui_app.init_window("UI") |
|
|
|
gui_app.init_window("UI") |
|
|
|
main_layout = MainLayout() |
|
|
|
main_layout = MainLayout() |
|
|
|
@ -18,6 +20,13 @@ def main(): |
|
|
|
if should_render: |
|
|
|
if should_render: |
|
|
|
main_layout.render() |
|
|
|
main_layout.render() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# reaffine after power save offlines our core |
|
|
|
|
|
|
|
if os.sched_getaffinity(0) != cores: |
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
set_core_affinity(list(cores)) |
|
|
|
|
|
|
|
except OSError: |
|
|
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
if __name__ == "__main__": |
|
|
|
main() |
|
|
|
main() |
|
|
|
|