mirror of
https://github.com/infiniteCable2/opendbc.git
synced 2026-02-18 04:54:06 +08:00
Add safety headers to package (#2258)
* Add safety headers to package * include path * it's for the whole project * update * guard
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,6 +17,7 @@
|
||||
*.gcno
|
||||
|
||||
uv.lock
|
||||
/dist/
|
||||
|
||||
opendbc/can/build/
|
||||
opendbc/can/obj/
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
include opendbc/car/car.capnp
|
||||
include opendbc/car/include/c++.capnp
|
||||
recursive-include opendbc/safety *.h
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import os
|
||||
|
||||
DBC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dbc')
|
||||
|
||||
# -I include path for e.g. "#include <opendbc/safety/safety.h>"
|
||||
INCLUDE_PATH = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
// TODO: clean this up. it's for interop with the panda version
|
||||
#ifndef CANPACKET_HEAD_SIZE
|
||||
|
||||
#include "opendbc/safety/board/can_declarations.h"
|
||||
|
||||
static const unsigned char dlc_to_len[] = {0U, 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 12U, 16U, 20U, 24U, 32U, 48U, 64U};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -120,3 +120,9 @@ flake8-implicit-str-concat.allow-multiline=false
|
||||
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"
|
||||
# TODO: re-enable when all tests are converted to pytest
|
||||
#"unittest".msg = "Use pytest"
|
||||
|
||||
[tool.setuptools]
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"opendbc.safety" = ["*.h", "board/*.h", "board/drivers/*.h", "safety/*.h"]
|
||||
|
||||
Reference in New Issue
Block a user