Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/commaai/opendbc into vw-mlb
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoung8607 committed Mar 23, 2024
2 parents 5ab15c8 + 3c926e8 commit 8e98a9d
Show file tree
Hide file tree
Showing 42 changed files with 3,085 additions and 1,407 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ repos:
- --check-hidden
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.2
hooks:
- id: ruff
- repo: https://github.com/MarcoGorelli/cython-lint
Expand Down
2 changes: 1 addition & 1 deletion acura_ilx_2016_can_generated.dbc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CM_ "AUTOGENERATED FILE, DO NOT EDIT";


CM_ "Imported file _comma.dbc starts here";
CM_ "Imported file _community.dbc starts here";
BO_ 512 GAS_COMMAND: 6 EON
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
Expand Down
2 changes: 1 addition & 1 deletion acura_rdx_2018_can_generated.dbc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CM_ "AUTOGENERATED FILE, DO NOT EDIT";


CM_ "Imported file _comma.dbc starts here";
CM_ "Imported file _community.dbc starts here";
BO_ 512 GAS_COMMAND: 6 EON
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion generator/gm/gm_global_a_powertrain.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";

VERSION ""

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion generator/honda/acura_ilx_2016_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_b.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/acura_rdx_2018_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_b.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_civic_ex_2022_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _bosch_2018.dbc";
CM_ "IMPORT _steering_sensors_a.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_civic_touring_2016_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_a.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_clarity_hybrid_2018_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_a.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_crv_executive_2016_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";

Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_crv_touring_2016_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_b.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_fit_ex_2018_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_b.dbc";
Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_fit_hybrid_2018_can.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";

Expand Down
2 changes: 1 addition & 1 deletion generator/honda/honda_odyssey_exl_2018.dbc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";
CM_ "IMPORT _steering_sensors_b.dbc";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CM_ "IMPORT _comma.dbc";
CM_ "IMPORT _community.dbc";
CM_ "IMPORT _honda_common.dbc";
CM_ "IMPORT _nidec_common.dbc";

Expand Down
1 change: 1 addition & 0 deletions generator/tesla/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.dbc
38 changes: 38 additions & 0 deletions generator/tesla/radar_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python3

def get_radar_point_definition(base_id, base_name):
return f"""
BO_ {base_id} {base_name}_A: 8 Radar
SG_ LongDist : 0|12@1+ (0.0625,0) [0|255.9] "meters" Autopilot
SG_ LongSpeed : 12|12@1+ (0.0625,-128) [-128|128] "meters/sec" Autopilot
SG_ LatDist : 24|11@1+ (0.125,-128) [-128|128] "meters" Autopilot
SG_ ProbExist : 35|5@1+ (3.125,0) [0|96.875] "%" Autopilot
SG_ LongAccel : 40|10@1+ (0.03125,-16) [-16|16] "meters/sec/sec" Autopilot
SG_ ProbObstacle : 50|5@1+ (3.125,0) [0|96.875] "%" Autopilot
SG_ Valid : 55|1@1+ (1,0) [0|1] "" Autopilot
SG_ ProbNonObstacle : 56|5@1+ (3.125,0) [0|96.875] "%" Autopilot
SG_ Meas : 61|1@1+ (1,0) [0|1] "" Autopilot
SG_ Tracked : 62|1@1+ (1,0) [0|1] "" Autopilot
SG_ Index : 63|1@1+ (1,0) [0|1] "" Autopilot
BO_ {base_id+1} {base_name}_B: 8 Radar
SG_ LatSpeed : 0|10@1+ (0.125,-64) [-64|64] "meters/sec" Autopilot
SG_ Length : 10|6@1+ (0.125,0) [0|7.875] "m" Autopilot
SG_ dZ : 16|6@1+ (0.25,-5) [-5|10.75] "m" Autopilot
SG_ MovingState : 22|2@1+ (1,0) [0|3] "" Autopilot
SG_ dxSigma : 24|6@1+ (1,0) [0|63] "" Autopilot
SG_ vxSigma : 30|6@1+ (1,0) [0|63] "" Autopilot
SG_ axSigma : 36|6@1+ (1,0) [0|63] "" Autopilot
SG_ dySigma : 42|6@1+ (1,0) [0|63] "" Autopilot
SG_ ProbClass : 48|5@1+ (3.125,0) [0|96.875] "%" Autopilot
SG_ Class : 53|3@1+ (1,0) [0|7] "" Autopilot
SG_ dxRearEndLoss : 56|6@1+ (1,0) [0|63] "" Autopilot
SG_ NotUsed : 62|1@1+ (1,0) [0|1] "" Autopilot
SG_ Index2 : 63|1@1+ (1,0) [0|1] "" Autopilot
"""

def get_val_definition(base_id):
return f"""
VAL_ {base_id+1} MovingState 3 "RADAR_MOVESTATE_STANDING" 2 "RADAR_MOVESTATE_STOPPED" 1 "RADAR_MOVESTATE_MOVING" 0 "RADAR_MOVESTATE_INDETERMINATE" ;
VAL_ {base_id+1} Class 4 "RADAR_CLASS_CONSTRUCTION_ELEMENT" 3 "RADAR_CLASS_MOVING_PEDESTRIAN" 2 "RADAR_CLASS_MOVING_TWO_WHEEL_VEHICLE" 1 \
"RADAR_CLASS_MOVING_FOUR_WHEEL_VEHICLE" 0 "RADAR_CLASS_UNKNOWN" ;"""
Loading

0 comments on commit 8e98a9d

Please sign in to comment.