Files
onepilot/cereal/__init__.py
T
Vehicle Researcher 9f648e0963 openpilot v0.10.1
2025-08-24 02:10:58 -07:00

12 lines
357 B
Python

import os
import capnp
from importlib.resources import as_file, files
capnp.remove_import_hook()
with as_file(files("cereal")) as fspath:
CEREAL_PATH = fspath.as_posix()
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"))
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp"))
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp"))