Skip to content

Commit

Permalink
Squashed 'opendbc/' changes from f1e69a6cf..124719992
Browse files Browse the repository at this point in the history
124719992 Add BSD_RCTA to Subaru Global (#244)
af1821f84 fix endianness in signal from new hyundai message
7ef41084b Add gas/brake message for hyundai EVs, from @TK211X
472aabb4f Subaru preglobal update (#260)
45c0d9ecc fix lta message (#262)
11343c108 Library cleanup (#261)
67d70cb86 Fix Toyota message size

git-subtree-dir: opendbc
git-subtree-split: 124719992d9234edfb61a497486fc9bd49fce24e
  • Loading branch information
Vehicle Researcher committed May 25, 2020
1 parent e0ab166 commit a64f47d
Show file tree
Hide file tree
Showing 28 changed files with 436 additions and 248 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ubuntu:16.04

RUN apt-get update && apt-get install -y libzmq3-dev clang wget git autoconf libtool curl make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
RUN apt-get update && apt-get install -y libzmq3-dev capnproto libcapnp-dev clang wget git autoconf libtool curl make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl

RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
Expand All @@ -13,11 +13,9 @@ RUN pip install -r /tmp/requirements.txt

ENV PYTHONPATH=/project

WORKDIR /project
# TODO: Add tag to cereal
RUN git clone https://github.com/commaai/cereal.git /project/cereal
RUN /project/cereal/install_capnp.sh

WORKDIR /project

COPY SConstruct .
COPY . /project/opendbc
Expand Down
4 changes: 2 additions & 2 deletions can/packer_pyx_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_ext_filename(self, ext_name):


sourcefiles = ['packer_pyx.pyx']
extra_compile_args = ["-std=c++11"]
extra_compile_args = ["-std=c++14"]
ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() # pylint: disable=unexpected-keyword-arg

if ARCH == "aarch64":
Expand All @@ -54,7 +54,7 @@ def get_ext_filename(self, ext_name):
extra_compile_args=extra_compile_args,
include_dirs=[
BASEDIR,
os.path.join(BASEDIR, 'phonelibs', 'capnp-cpp/include'),
os.path.join(BASEDIR, 'phonelibs'),
],
extra_link_args=[
os.path.join(BASEDIR, 'opendbc', 'can', libdbc),
Expand Down
4 changes: 2 additions & 2 deletions can/parser_pyx_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_ext_filename(self, ext_name):


sourcefiles = ['parser_pyx.pyx']
extra_compile_args = ["-std=c++11"]
extra_compile_args = ["-std=c++14"]
ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() # pylint: disable=unexpected-keyword-arg

if ARCH == "aarch64":
Expand All @@ -54,7 +54,7 @@ def get_ext_filename(self, ext_name):
extra_compile_args=extra_compile_args,
include_dirs=[
BASEDIR,
os.path.join(BASEDIR, 'phonelibs', 'capnp-cpp/include'),
os.path.join(BASEDIR, 'phonelibs'),
],
extra_link_args=[
os.path.join(BASEDIR, 'opendbc', 'can', libdbc),
Expand Down
2 changes: 1 addition & 1 deletion can/process_dbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def process(in_fn, out_fn):
checksum_start_bit = 0
counter_start_bit = 0
little_endian = True
elif can_dbc.name.startswith(("subaru_")):
elif can_dbc.name.startswith(("subaru_global_")):
checksum_type = "subaru"
checksum_size = 8
counter_size = None
Expand Down
6 changes: 3 additions & 3 deletions generator/toyota/_toyota_2017.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
4 changes: 3 additions & 1 deletion generator/toyota/toyota_nodsu_pt.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CM_ "IMPORT _comma.dbc"
CM_ "IMPORT _toyota_nodsu_bsm.dbc"

BO_ 401 STEERING_LTA: 8 XXX
SG_ COUNTER : 7|8@0+ (1,0) [0|255] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ SETME_X3 : 29|2@0+ (1,0) [0|3] "" XXX
SG_ PERCENTAGE : 39|8@0+ (1,0) [0|255] "" XXX
Expand All @@ -12,6 +11,9 @@ BO_ 401 STEERING_LTA: 8 XXX
SG_ STEER_ANGLE_CMD : 15|16@0- (0.0573,0) [-540|540] "" XXX
SG_ STEER_REQUEST : 25|1@0+ (1,0) [0|1] "" XXX
SG_ BIT : 30|1@0+ (1,0) [0|1] "" XXX
SG_ COUNTER : 6|6@0+ (1,0) [0|255] "" XXX
SG_ STEER_REQUEST_2 : 0|1@0+ (1,0) [0|1] "" XXX
SG_ SETME_X1 : 7|1@0+ (1,0) [0|1] "" XXX

BO_ 550 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
Expand Down
8 changes: 8 additions & 0 deletions hyundai_kia_generic.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,14 @@ BO_ 790 EMS11: 8 EMS
SG_ VS : 48|8@1+ (1.0,0.0) [0.0|254.0] "km/h" _4WD,AAF,ACU,AHLS,BCM,CLU,DATC,ECS,EPB,IBOX,LCA,LDWS_LKAS,LVR,MDPS,ODS,SCC,SMK,SPAS,TCU,TPMS
SG_ RATIO_TQI_BAS_MAX_STND : 56|8@1+ (0.0078,0.0) [0.0|2.0] "" _4WD,IBOX,TCU

BO_ 881 E_EMS11: 8 XXX
SG_ Cruise_Limit_Status : 13|1@1+ (1,0) [0|1] "" XXX
SG_ Cruise_Limit_Target : 23|8@1+ (1,0) [0|15] "" XXX
SG_ Gear_Change : 12|1@0+ (1,0) [0|31] "" XXX
SG_ IG_Reactive_Stat : 8|3@1+ (1,0) [0|3] "" XXX
SG_ Brake_Pedal_Pos : 0|8@1+ (1,0) [0|127] "" XXX
SG_ Accel_Pedal_Pos : 31|8@1+ (1,0) [0|7] "" XXX

BO_ 1301 CLU14: 8 CLU
SG_ CF_Clu_ADrUNValueSet : 0|3@1+ (1.0,0.0) [0.0|7.0] "" BCM
SG_ CF_Clu_ADrLNValueSet : 3|3@1+ (1.0,0.0) [0.0|7.0] "" BCM
Expand Down
6 changes: 3 additions & 3 deletions lexus_ct200h_2018_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
6 changes: 3 additions & 3 deletions lexus_gs300h_2017_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
6 changes: 3 additions & 3 deletions lexus_is_2018_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
6 changes: 3 additions & 3 deletions lexus_nx300h_2018_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
6 changes: 3 additions & 3 deletions lexus_rx_350_2016_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
6 changes: 3 additions & 3 deletions lexus_rx_hybrid_2017_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ BO_ 180 SPEED: 8 XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 353 DSU_SPEED: 8 XXX
BO_ 353 DSU_SPEED: 7 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX

BO_ 452 ENGINE_RPM: 8 CGW
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS

BO_ 466 PCM_CRUISE: 8 XXX
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
7 changes: 5 additions & 2 deletions subaru_crosstrek_2018.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,13 @@ BO_ 577 NEW_MSG_16: 8 XXX
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
SG_ NEW_SIGNAL_1 : 16|12@1+ (1,0) [0|255] "" XXX

BO_ 552 NEW_MSG_17: 8 XXX
BO_ 552 BSD_RCTA: 8 XXX
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
SG_ NEW_SIGNAL_1 : 48|1@1+ (1,0) [0|3] "" XXX
SG_ R_ADJACENT : 48|1@1+ (1,0) [0|1] "" XXX
SG_ L_ADJACENT : 49|1@1+ (1,0) [0|1] "" XXX
SG_ R_APPROACHING : 58|1@1+ (1,0) [0|1] "" XXX
SG_ L_APPROACHING : 59|1@1+ (1,0) [0|1] "" XXX

BO_ 912 Dashlights: 8 XXX
SG_ NEW_SIGNAL_1 : 32|1@1+ (1,0) [0|3] "" XXX
Expand Down
Loading

0 comments on commit a64f47d

Please sign in to comment.