mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 21:12:07 +08:00
ui: fix running on macOS
This commit is contained in:
+2
-1
@@ -2,6 +2,7 @@
|
||||
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
|
||||
@@ -21,7 +22,7 @@ def main():
|
||||
main_layout.render()
|
||||
|
||||
# reaffine after power save offlines our core
|
||||
if os.sched_getaffinity(0) != cores:
|
||||
if TICI and os.sched_getaffinity(0) != cores:
|
||||
try:
|
||||
set_core_affinity(list(cores))
|
||||
except OSError:
|
||||
|
||||
Reference in New Issue
Block a user