mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 03:03:57 +08:00
Used to ship python UI in agnos without an openpilot clone * add a main method to target * pack script * validate inputs * refactors * copy into temp, dont keep this * cleanup * help messages * rename to pack.py * pack.py * updates for device * moar * don't use cereal * just log normally * use importlib.resources * revert * Revert "don't use cereal" This reverts commit 7208524d422d88a1b07e209359aeb25e8b3bf4e7. * fix cereal? * cleanup * Revert "cleanup" This reverts commit 921edfe5020f244dbdf4f26767af7c98ca837d1c. * cython hotfix * Reapply "cleanup" This reverts commit 9b54552f784dea1b1eb4ffc03937571e4fc851ba. * more cleanup * any script? * slightly clearer * rm print * nothing python should use SVGs --------- Co-authored-by: Trey Moen <trey@moen.ai>
12 lines
357 B
Python
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"))
|