Skip to content

Commit

Permalink
generator: fix imports leaving extra newlines (commaai#508)
Browse files Browse the repository at this point in the history
* fix imports leaving an extra line

* generate!
  • Loading branch information
sshane authored Jan 20, 2022
1 parent 4539609 commit 5949d4f
Show file tree
Hide file tree
Showing 33 changed files with 1 addition and 55 deletions.
2 changes: 0 additions & 2 deletions acura_ilx_2016_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "acura_ilx_2016_can.dbc starts here";



BO_ 145 KINEMATICS: 8 XXX
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON

Expand Down
2 changes: 0 additions & 2 deletions acura_rdx_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "acura_rdx_2018_can.dbc starts here";



BO_ 342 STEERING_SENSORS: 6 EPS
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
Expand Down
1 change: 0 additions & 1 deletion acura_rdx_2020_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "acura_rdx_2020_can.dbc starts here";


BO_ 304 GAS_PEDAL_2: 8 PCM
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

cur_path = os.path.dirname(os.path.realpath(__file__))
opendbc_root = os.path.join(cur_path, '../')
include_pattern = re.compile(r'CM_ "IMPORT (.*?)";')
include_pattern = re.compile(r'CM_ "IMPORT (.*?)";\n')


def read_dbc(src_dir, filename):
Expand Down
1 change: 0 additions & 1 deletion honda_accord_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "honda_accord_2018_can.dbc starts here";


BO_ 304 GAS_PEDAL_2: 8 PCM
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
Expand Down
1 change: 0 additions & 1 deletion honda_civic_hatchback_ex_2017_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "honda_civic_hatchback_ex_2017_can.dbc starts here";


BO_ 304 GAS_PEDAL_2: 8 PCM
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
Expand Down
1 change: 0 additions & 1 deletion honda_civic_sedan_16_diesel_2019_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "honda_civic_sedan_16_diesel_2019_can.dbc starts here";


BO_ 316 GAS_PEDAL_2: 8 XXX
SG_ CAR_GAS : 39|8@0+ (1,0) [0|255] "" XXX
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions honda_civic_touring_2016_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_civic_touring_2016_can.dbc starts here";



BO_ 148 KINEMATICS: 8 XXX
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
SG_ LONG_ACCEL : 24|9@0- (-0.02,0) [-20|20] "m/s2" EON
Expand Down
2 changes: 0 additions & 2 deletions honda_clarity_hybrid_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_clarity_hybrid_2018_can.dbc starts here";



BO_ 148 KINEMATICS: 8 XXX
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON
SG_ LONG_ACCEL : 24|9@0- (-0.02,0) [-20|20] "m/s2" EON
Expand Down
1 change: 0 additions & 1 deletion honda_crv_ex_2017_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "honda_crv_ex_2017_can.dbc starts here";


BO_ 304 GAS_PEDAL_2: 8 PCM
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
Expand Down
2 changes: 0 additions & 2 deletions honda_crv_executive_2016_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_crv_executive_2016_can.dbc starts here";



BO_ 342 STEERING_SENSORS: 6 EPS
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
Expand Down
1 change: 0 additions & 1 deletion honda_crv_hybrid_2019_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "honda_crv_hybrid_2019_can.dbc starts here";


BO_ 304 GAS_PEDAL_2: 8 PCM
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
Expand Down
2 changes: 0 additions & 2 deletions honda_crv_touring_2016_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_crv_touring_2016_can.dbc starts here";



BO_ 342 STEERING_SENSORS: 6 EPS
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
SG_ STEER_ANGLE_RATE : 23|16@0- (-1,0) [-3000|3000] "deg/s" EON
Expand Down
2 changes: 0 additions & 2 deletions honda_fit_ex_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_fit_ex_2018_can.dbc starts here";



BO_ 145 KINEMATICS: 8 XXX
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON

Expand Down
2 changes: 0 additions & 2 deletions honda_fit_hybrid_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_fit_hybrid_2018_can.dbc starts here";



BO_ 145 KINEMATICS: 8 XXX
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON

Expand Down
1 change: 0 additions & 1 deletion honda_insight_ex_2019_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_spe

CM_ "honda_insight_ex_2019_can.dbc starts here";


BO_ 304 GAS_PEDAL_2: 8 PCM
SG_ ENGINE_TORQUE_ESTIMATE : 7|16@0- (1,0) [-1000|1000] "Nm" EON
SG_ ENGINE_TORQUE_REQUEST : 23|16@0- (1,0) [-1000|1000] "Nm" EON
Expand Down
2 changes: 0 additions & 2 deletions honda_odyssey_exl_2018_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_odyssey_exl_2018.dbc starts here";



BO_ 228 STEERING_CONTROL: 5 ADAS
SG_ STEER_TORQUE : 7|16@0- (1,0) [-3840|3840] "" EPS
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
Expand Down
2 changes: 0 additions & 2 deletions honda_odyssey_extreme_edition_2018_china_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_odyssey_extreme_edition_2018_china_can.dbc starts here";



BO_ 316 GAS_PEDAL: 8 PCM
SG_ CAR_GAS : 39|8@0+ (1,0) [0|255] "" EON

Expand Down
2 changes: 0 additions & 2 deletions honda_pilot_touring_2017_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND"

CM_ "honda_pilot_touring_2017_can.dbc starts here";



BO_ 145 KINEMATICS: 8 XXX
SG_ LAT_ACCEL : 7|10@0+ (0.02,-512) [-20|20] "m/s2" EON

Expand Down
2 changes: 0 additions & 2 deletions lexus_ct200h_2018_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "lexus_ct200h_2018_pt.dbc starts here";



BO_ 548 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 43|12@0+ (1,0) [0|4047] "" XXX
SG_ BRAKE_PRESSED : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions lexus_is_2018_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "lexus_is_2018_pt.dbc starts here";



BO_ 550 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
Expand Down
1 change: 0 additions & 1 deletion subaru_forester_2017_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ VAL_ 328 Gear 0 "N" 1 "D" 2 "D" 3 "D" 4 "D" 5 "D" 6 "D" 14 "R" 15 "P";

CM_ "subaru_forester_2017.dbc starts here";


BO_ 355 ES_DashStatus: 8 XXX
SG_ Not_Ready_Startup : 4|2@1+ (1,0) [0|3] "" XXX
SG_ Cruise_On : 16|1@1+ (1,0) [0|1] "" XXX
Expand Down
1 change: 0 additions & 1 deletion subaru_global_2017_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ CM_ SG_ 912 ICY_ROAD "1 = DASHLIGHT ON, 2 = WARNING, 3 = OFF";

CM_ "subaru_global_2017.dbc starts here";


BO_ 72 Transmission: 8 XXX
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" XXX
SG_ Counter : 8|4@1+ (1,0) [0|15] "" XXX
Expand Down
1 change: 0 additions & 1 deletion subaru_global_2020_hybrid_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ CM_ SG_ 912 ICY_ROAD "1 = DASHLIGHT ON, 2 = WARNING, 3 = OFF";

CM_ "subaru_global_2020_hybrid.dbc starts here";


BO_ 39 Cruise_Status_2: 8 XXX
SG_ Cruise_Activated : 37|1@0+ (1,0) [0|1] "" XXX

Expand Down
1 change: 0 additions & 1 deletion subaru_outback_2015_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ VAL_ 328 Gear 0 "N" 1 "D" 2 "D" 3 "D" 4 "D" 5 "D" 6 "D" 14 "R" 15 "P";

CM_ "subaru_outback_2015.dbc starts here";


BO_ 358 ES_DashStatus: 8 XXX
SG_ Not_Ready_Startup : 0|3@1+ (1,0) [0|7] "" XXX
SG_ Seatbelt_Disengage : 12|2@1+ (1,0) [0|3] "" XXX
Expand Down
1 change: 0 additions & 1 deletion subaru_outback_2019_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ VAL_ 328 Gear 0 "N" 1 "D" 2 "D" 3 "D" 4 "D" 5 "D" 6 "D" 14 "R" 15 "P";

CM_ "subaru_outback_2019.dbc starts here";


BO_ 358 ES_DashStatus: 8 XXX
SG_ Not_Ready_Startup : 0|3@1+ (1,0) [0|7] "" XXX
SG_ Seatbelt_Disengage : 12|2@1+ (1,0) [0|3] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions toyota_corolla_2017_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "toyota_corolla_2017_pt.dbc starts here";



BO_ 548 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 43|12@0+ (1,0) [0|4047] "" XXX
SG_ BRAKE_PRESSED : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
3 changes: 0 additions & 3 deletions toyota_nodsu_hybrid_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,6 @@ VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "stand

CM_ "toyota_nodsu_hybrid_pt.dbc starts here";




BO_ 295 GEAR_PACKET: 8 XXX
SG_ CAR_MOVEMENT : 39|8@0- (1,0) [0|255] "" XXX
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
Expand Down
3 changes: 0 additions & 3 deletions toyota_nodsu_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,6 @@ VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "stand

CM_ "toyota_nodsu_pt.dbc starts here";




BO_ 705 GAS_PEDAL: 8 XXX
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions toyota_prius_2017_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "toyota_prius_2017_pt.dbc starts here";



BO_ 295 GEAR_PACKET: 8 XXX
SG_ CAR_MOVEMENT : 39|8@0- (1,0) [0|255] "" XXX
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions toyota_rav4_2017_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "toyota_rav4_2017_pt.dbc starts here";



BO_ 548 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 43|12@0+ (1,0) [0|4047] "" XXX
SG_ BRAKE_PRESSED : 5|1@0+ (1,0) [0|1] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions toyota_tssp_hybrid_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "toyota_tssp_hybrid.dbc starts here";



BO_ 550 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
Expand Down
2 changes: 0 additions & 2 deletions toyota_tssp_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ CM_ SG_ 767 FD_BUTTON "The follow distance button signal as forwarded by the sds

CM_ "toyota_tssp_pt.dbc starts here";



BO_ 550 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|255] "" XXX
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|65535] "" XXX
Expand Down

0 comments on commit 5949d4f

Please sign in to comment.