Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "panda"]
path = panda
url = ../../commaai/panda.git
[submodule "opendbc"]
path = opendbc_repo
url = ../../commaai/opendbc.git
Expand Down
12 changes: 10 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import sysconfig
import platform
import shlex
import importlib
import importlib.util
import numpy as np

import SCons.Errors
Expand Down Expand Up @@ -49,6 +50,12 @@ acados_include_dirs = [
os.path.join(acados.INCLUDE_DIR, "hpipm", "include"),
]

panda_spec = importlib.util.find_spec("panda")
if panda_spec is None or not panda_spec.submodule_search_locations:
raise SCons.Errors.UserError("pandacan must be installed to build openpilot")
panda_dir = panda_spec.submodule_search_locations[0]
panda_include_dir = os.path.dirname(panda_dir)


# ***** enforce a whitelist of system libraries *****
# this prevents silently relying on a 3rd party package,
Expand Down Expand Up @@ -114,6 +121,7 @@ env = Environment(
CPPPATH=[
"#",
"#msgq",
panda_include_dir,
acados_include_dirs,
[x.INCLUDE_DIR for x in pkgs],
],
Expand Down Expand Up @@ -228,8 +236,8 @@ messaging = [socketmaster, msgq, 'capnp', 'kj',]
Export('messaging')


# Build other submodules
SConscript(['panda/SConscript'])
# Build panda firmware from the installed pandacan package.
SConscript(os.path.join(panda_dir, 'SConscript'), variant_dir='panda', duplicate=0)

# Build rednose library
SConscript(['rednose/SConscript'])
Expand Down
1 change: 0 additions & 1 deletion panda
Submodule panda deleted from b19b66
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ dependencies = [
"aiortc",

# panda
"libusb1",
"spidev; platform_system == 'Linux'",
"pandacan @ git+https://github.com/premkiran2/panda.git@proper-pip-package",

# logging
"pyzmq",
Expand Down
57 changes: 53 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading