mirror of
https://github.com/infiniteCable2/opendbc.git
synced 2026-02-18 13:03:52 +08:00
move to nested opendbc/ (#1069)
* move to nested opendbc/ * get CI working / similar to msgq * move dbcs to dbc/ * run pre-commit outside docker * move generator to dbc/ * fix path in print
This commit is contained in:
16
.gitignore
vendored
16
.gitignore
vendored
@@ -8,11 +8,11 @@
|
||||
.DS_Store
|
||||
.sconsign.dblite
|
||||
|
||||
can/*.so
|
||||
can/*.a
|
||||
can/build/
|
||||
can/obj/
|
||||
can/packer_pyx.cpp
|
||||
can/parser_pyx.cpp
|
||||
can/packer_pyx.html
|
||||
can/parser_pyx.html
|
||||
opendbc/can/*.so
|
||||
opendbc/can/*.a
|
||||
opendbc/can/build/
|
||||
opendbc/can/obj/
|
||||
opendbc/can/packer_pyx.cpp
|
||||
opendbc/can/parser_pyx.cpp
|
||||
opendbc/can/packer_pyx.html
|
||||
opendbc/can/parser_pyx.html
|
||||
|
||||
@@ -56,6 +56,6 @@ repos:
|
||||
hooks:
|
||||
- id: generator
|
||||
name: dbc generator
|
||||
entry: generator/test_generator.py
|
||||
entry: opendbc/dbc/generator/test_generator.py
|
||||
language: script
|
||||
pass_filenames: false
|
||||
|
||||
@@ -40,12 +40,8 @@ RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt
|
||||
RUN pip3 install --break-system-packages --no-cache-dir pre-commit==2.15.0 pylint==2.17.4
|
||||
|
||||
WORKDIR /project/opendbc
|
||||
ENV PYTHONPATH=/project
|
||||
ENV PYTHONPATH=/project/opendbc
|
||||
|
||||
COPY . .
|
||||
COPY SConstruct /project
|
||||
COPY ./site_scons /project/site_scons
|
||||
COPY .gitignore /project/.gitignore
|
||||
|
||||
RUN ls && rm -rf .git && cd ../ && \
|
||||
RUN ls && rm -rf .git && \
|
||||
scons -c && scons -j$(nproc) \
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
import os
|
||||
DBC_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
3
opendbc/__init__.py
Normal file
3
opendbc/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
import os
|
||||
|
||||
DBC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dbc')
|
||||
@@ -3,7 +3,7 @@ Import('env', 'envCython', 'common', 'arch')
|
||||
import os
|
||||
|
||||
envDBC = env.Clone()
|
||||
dbc_file_path = '-DDBC_FILE_PATH=\'"%s"\'' % (envDBC.Dir("..").abspath)
|
||||
dbc_file_path = '-DDBC_FILE_PATH=\'"%s"\'' % (envDBC.Dir("../dbc").abspath)
|
||||
envDBC['CXXFLAGS'] += [dbc_file_path]
|
||||
src = ["dbc.cc", "parser.cc", "packer.cc", "common.cc"]
|
||||
libs = [common, "zmq"]
|
||||
@@ -222,7 +222,7 @@ DBC* dbc_parse(const std::string& dbc_path) {
|
||||
const std::string get_dbc_root_path() {
|
||||
char *basedir = std::getenv("BASEDIR");
|
||||
if (basedir != NULL) {
|
||||
return std::string(basedir) + "/opendbc";
|
||||
return std::string(basedir) + "/opendbc/dbc";
|
||||
} else {
|
||||
return DBC_FILE_PATH;
|
||||
}
|
||||
0
opendbc/dbc/__init__.py
Normal file
0
opendbc/dbc/__init__.py
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user