mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 11:23:49 +08:00
Revert "Merge remote-tracking branch 'origin/master' into SunnyPilot"
This reverts commitbd4ed9d316, reversing changes made tof047a7d008.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
import platform
|
||||
from cffi import FFI
|
||||
|
||||
import sip
|
||||
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
|
||||
def suffix():
|
||||
return ".dylib" if platform.system() == "Darwin" else ".so"
|
||||
|
||||
|
||||
def get_ffi():
|
||||
lib = os.path.join(BASEDIR, "selfdrive", "ui", "qt", "libpython_helpers" + suffix())
|
||||
|
||||
ffi = FFI()
|
||||
ffi.cdef("void set_main_window(void *w);")
|
||||
return ffi, ffi.dlopen(lib)
|
||||
|
||||
|
||||
def set_main_window(widget):
|
||||
ffi, lib = get_ffi()
|
||||
lib.set_main_window(ffi.cast('void*', sip.unwrapinstance(widget)))
|
||||
Reference in New Issue
Block a user