mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-16 21:42:06 +08:00
df1663c58d
* the one true car.capnp * fix jotpluggler capnp import path * bump to master
12 lines
490 B
Python
12 lines
490 B
Python
import os
|
|
import capnp
|
|
from importlib.resources import as_file, files
|
|
|
|
capnp.remove_import_hook()
|
|
|
|
with as_file(files("cereal")) as fspath, as_file(files("opendbc")) as opendbc_path:
|
|
CEREAL_PATH = fspath.as_posix()
|
|
opendbc_import_path = os.path.join(os.path.realpath(opendbc_path.as_posix()), 'car')
|
|
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"), imports=[opendbc_import_path])
|
|
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp"), imports=[opendbc_import_path])
|