@@ -59,8 +59,6 @@ class HondaFlags(IntFlag):
59
59
NIDEC_ALT_PCM_ACCEL = 32
60
60
NIDEC_ALT_SCM_MESSAGES = 64
61
61
62
- AUTORESUME_SNG = 128
63
- ELECTRIC_PARKING_BRAKE = 256
64
62
65
63
# Car button codes
66
64
class CruiseButtons :
@@ -100,16 +98,19 @@ class Footnote(Enum):
100
98
Column .FSR_STEERING )
101
99
102
100
103
- class HondaPlatformConfig (PlatformConfig ):
101
+ class HondaBoschPlatformConfig (PlatformConfig ):
104
102
def init (self ):
105
- if self .flags & HondaFlags .BOSCH :
106
- self .flags |= HondaFlags .AUTORESUME_SNG
107
- self .flags |= HondaFlags .ELECTRIC_PARKING_BRAKE
103
+ self .flags |= HondaFlags .BOSCH
104
+
105
+
106
+ class HondaNidecPlatformConfig (PlatformConfig ):
107
+ def init (self ):
108
+ self .flags |= HondaFlags .NIDEC
108
109
109
110
110
111
class CAR (Platforms ):
111
112
# Bosch Cars
112
- ACCORD = HondaPlatformConfig (
113
+ ACCORD = HondaBoschPlatformConfig (
113
114
"HONDA ACCORD 2018" ,
114
115
[
115
116
HondaCarInfo ("Honda Accord 2018-22" , "All" , video_link = "https://www.youtube.com/watch?v=mrUwlj3Mi58" , min_steer_speed = 3. * CV .MPH_TO_MS ),
@@ -118,9 +119,8 @@ class CAR(Platforms):
118
119
],
119
120
CarSpecs (mass = 3279 * CV .LB_TO_KG , wheelbase = 2.83 , steerRatio = 16.33 , centerToFrontRatio = 0.39 ), # steerRatio: 11.82 is spec end-to-end
120
121
dbc_dict ('honda_accord_2018_can_generated' , None ),
121
- flags = HondaFlags .BOSCH ,
122
122
)
123
- CIVIC_BOSCH = HondaPlatformConfig (
123
+ CIVIC_BOSCH = HondaBoschPlatformConfig (
124
124
"HONDA CIVIC (BOSCH) 2019" ,
125
125
[
126
126
HondaCarInfo ("Honda Civic 2019-21" , "All" , video_link = "https://www.youtube.com/watch?v=4Iz1Mz5LGF8" ,
@@ -129,155 +129,149 @@ class CAR(Platforms):
129
129
],
130
130
CarSpecs (mass = 1326 , wheelbase = 2.7 , steerRatio = 15.38 , centerToFrontRatio = 0.4 ), # steerRatio: 10.93 is end-to-end spec
131
131
dbc_dict ('honda_civic_hatchback_ex_2017_can_generated' , None ),
132
- flags = HondaFlags .BOSCH
133
132
)
134
- CIVIC_BOSCH_DIESEL = HondaPlatformConfig (
133
+ CIVIC_BOSCH_DIESEL = HondaBoschPlatformConfig (
135
134
"HONDA CIVIC SEDAN 1.6 DIESEL 2019" ,
136
- None , # don't show in docs
135
+ None , # don't show in docs
137
136
CIVIC_BOSCH .specs ,
138
137
dbc_dict ('honda_accord_2018_can_generated' , None ),
139
- flags = HondaFlags .BOSCH
140
138
)
141
- CIVIC_2022 = HondaPlatformConfig (
139
+ CIVIC_2022 = HondaBoschPlatformConfig (
142
140
"HONDA CIVIC 2022" ,
143
141
[
144
142
HondaCarInfo ("Honda Civic 2022-23" , "All" , video_link = "https://youtu.be/ytiOT5lcp6Q" ),
145
143
HondaCarInfo ("Honda Civic Hatchback 2022-23" , "All" , video_link = "https://youtu.be/ytiOT5lcp6Q" ),
146
144
],
147
145
CIVIC_BOSCH .specs ,
148
146
dbc_dict ('honda_civic_ex_2022_can_generated' , None ),
149
- flags = HondaFlags .BOSCH | HondaFlags . BOSCH_RADARLESS ,
147
+ flags = HondaFlags .BOSCH_RADARLESS ,
150
148
)
151
- CRV_5G = HondaPlatformConfig (
149
+ CRV_5G = HondaBoschPlatformConfig (
152
150
"HONDA CR-V 2017" ,
153
151
HondaCarInfo ("Honda CR-V 2017-22" , min_steer_speed = 12. * CV .MPH_TO_MS ),
154
152
CarSpecs (mass = 3410 * CV .LB_TO_KG , wheelbase = 2.66 , steerRatio = 16.0 , centerToFrontRatio = 0.41 ), # steerRatio: 12.3 is spec end-to-end
155
153
dbc_dict ('honda_crv_ex_2017_can_generated' , None , body_dbc = 'honda_crv_ex_2017_body_generated' ),
156
- flags = HondaFlags .BOSCH ,
154
+ flags = HondaFlags .BOSCH_ALT_BRAKE ,
157
155
)
158
- CRV_HYBRID = HondaPlatformConfig (
156
+ CRV_HYBRID = HondaBoschPlatformConfig (
159
157
"HONDA CR-V HYBRID 2019" ,
160
158
HondaCarInfo ("Honda CR-V Hybrid 2017-20" , min_steer_speed = 12. * CV .MPH_TO_MS ),
161
159
CarSpecs (mass = 1667 , wheelbase = 2.66 , steerRatio = 16 , centerToFrontRatio = 0.41 ), # mass: mean of 4 models in kg, steerRatio: 12.3 is spec end-to-end
162
160
dbc_dict ('honda_accord_2018_can_generated' , None ),
163
- flags = HondaFlags .BOSCH
164
161
)
165
- HRV_3G = HondaPlatformConfig (
162
+ HRV_3G = HondaBoschPlatformConfig (
166
163
"HONDA HR-V 2023" ,
167
164
HondaCarInfo ("Honda HR-V 2023" , "All" ),
168
165
CarSpecs (mass = 3125 * CV .LB_TO_KG , wheelbase = 2.61 , steerRatio = 15.2 , centerToFrontRatio = 0.41 ),
169
166
dbc_dict ('honda_civic_ex_2022_can_generated' , None ),
170
- flags = HondaFlags .BOSCH | HondaFlags .BOSCH_RADARLESS
167
+ flags = HondaFlags .BOSCH_RADARLESS | HondaFlags .BOSCH_ALT_BRAKE ,
171
168
)
172
- ACURA_RDX_3G = HondaPlatformConfig (
169
+ ACURA_RDX_3G = HondaBoschPlatformConfig (
173
170
"ACURA RDX 2020" ,
174
171
HondaCarInfo ("Acura RDX 2019-22" , "All" , min_steer_speed = 3. * CV .MPH_TO_MS ),
175
172
CarSpecs (mass = 4068 * CV .LB_TO_KG , wheelbase = 2.75 , steerRatio = 11.95 , centerToFrontRatio = 0.41 ), # as spec
176
173
dbc_dict ('acura_rdx_2020_can_generated' , None ),
177
- flags = HondaFlags .BOSCH
174
+ flags = HondaFlags .BOSCH_ALT_BRAKE ,
178
175
)
179
- INSIGHT = HondaPlatformConfig (
176
+ INSIGHT = HondaBoschPlatformConfig (
180
177
"HONDA INSIGHT 2019" ,
181
178
HondaCarInfo ("Honda Insight 2019-22" , "All" , min_steer_speed = 3. * CV .MPH_TO_MS ),
182
179
CarSpecs (mass = 2987 * CV .LB_TO_KG , wheelbase = 2.7 , steerRatio = 15.0 , centerToFrontRatio = 0.39 ), # as spec
183
180
dbc_dict ('honda_insight_ex_2019_can_generated' , None ),
184
- flags = HondaFlags .BOSCH
185
181
)
186
- HONDA_E = HondaPlatformConfig (
182
+ HONDA_E = HondaBoschPlatformConfig (
187
183
"HONDA E 2020" ,
188
184
HondaCarInfo ("Honda e 2020" , "All" , min_steer_speed = 3. * CV .MPH_TO_MS ),
189
185
CarSpecs (mass = 3338.8 * CV .LB_TO_KG , wheelbase = 2.5 , centerToFrontRatio = 0.5 , steerRatio = 16.71 ),
190
186
dbc_dict ('acura_rdx_2020_can_generated' , None ),
191
- flags = HondaFlags .BOSCH
192
187
)
193
188
194
189
# Nidec Cars
195
- ACURA_ILX = HondaPlatformConfig (
190
+ ACURA_ILX = HondaNidecPlatformConfig (
196
191
"ACURA ILX 2016" ,
197
192
HondaCarInfo ("Acura ILX 2016-19" , "AcuraWatch Plus" , min_steer_speed = 25. * CV .MPH_TO_MS ),
198
193
CarSpecs (mass = 3095 * CV .LB_TO_KG , wheelbase = 2.67 , steerRatio = 18.61 , centerToFrontRatio = 0.37 ), # 15.3 is spec end-to-end
199
194
dbc_dict ('acura_ilx_2016_can_generated' , 'acura_ilx_2016_nidec' ),
200
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
195
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
201
196
)
202
- CRV = HondaPlatformConfig (
197
+ CRV = HondaNidecPlatformConfig (
203
198
"HONDA CR-V 2016" ,
204
199
HondaCarInfo ("Honda CR-V 2015-16" , "Touring Trim" , min_steer_speed = 12. * CV .MPH_TO_MS ),
205
200
CarSpecs (mass = 3572 * CV .LB_TO_KG , wheelbase = 2.62 , steerRatio = 16.89 , centerToFrontRatio = 0.41 ), # as spec
206
201
dbc_dict ('honda_crv_touring_2016_can_generated' , 'acura_ilx_2016_nidec' ),
207
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
202
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
208
203
)
209
- CRV_EU = HondaPlatformConfig (
204
+ CRV_EU = HondaNidecPlatformConfig (
210
205
"HONDA CR-V EU 2016" ,
211
- None , # Euro version of CRV Touring, don't show in docs
206
+ None , # Euro version of CRV Touring, don't show in docs
212
207
CRV .specs ,
213
208
dbc_dict ('honda_crv_executive_2016_can_generated' , 'acura_ilx_2016_nidec' ),
214
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
209
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
215
210
)
216
- FIT = HondaPlatformConfig (
211
+ FIT = HondaNidecPlatformConfig (
217
212
"HONDA FIT 2018" ,
218
213
HondaCarInfo ("Honda Fit 2018-20" , min_steer_speed = 12. * CV .MPH_TO_MS ),
219
214
CarSpecs (mass = 2644 * CV .LB_TO_KG , wheelbase = 2.53 , steerRatio = 13.06 , centerToFrontRatio = 0.39 ),
220
215
dbc_dict ('honda_fit_ex_2018_can_generated' , 'acura_ilx_2016_nidec' ),
221
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
216
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
222
217
)
223
- FREED = HondaPlatformConfig (
218
+ FREED = HondaNidecPlatformConfig (
224
219
"HONDA FREED 2020" ,
225
220
HondaCarInfo ("Honda Freed 2020" , min_steer_speed = 12. * CV .MPH_TO_MS ),
226
221
CarSpecs (mass = 3086. * CV .LB_TO_KG , wheelbase = 2.74 , steerRatio = 13.06 , centerToFrontRatio = 0.39 ), # mostly copied from FIT
227
222
dbc_dict ('honda_fit_ex_2018_can_generated' , 'acura_ilx_2016_nidec' ),
228
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
223
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
229
224
)
230
- HRV = HondaPlatformConfig (
225
+ HRV = HondaNidecPlatformConfig (
231
226
"HONDA HRV 2019" ,
232
227
HondaCarInfo ("Honda HR-V 2019-22" , min_steer_speed = 12. * CV .MPH_TO_MS ),
233
228
HRV_3G .specs ,
234
229
dbc_dict ('honda_fit_ex_2018_can_generated' , 'acura_ilx_2016_nidec' ),
235
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
230
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
236
231
)
237
- ODYSSEY = HondaPlatformConfig (
232
+ ODYSSEY = HondaNidecPlatformConfig (
238
233
"HONDA ODYSSEY 2018" ,
239
234
HondaCarInfo ("Honda Odyssey 2018-20" ),
240
235
CarSpecs (mass = 1900 , wheelbase = 3.0 , steerRatio = 14.35 , centerToFrontRatio = 0.41 ),
241
236
dbc_dict ('honda_odyssey_exl_2018_generated' , 'acura_ilx_2016_nidec' ),
242
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_PCM_ACCEL
237
+ flags = HondaFlags .NIDEC_ALT_PCM_ACCEL ,
243
238
)
244
- ODYSSEY_CHN = HondaPlatformConfig (
239
+ ODYSSEY_CHN = HondaNidecPlatformConfig (
245
240
"HONDA ODYSSEY CHN 2019" ,
246
- None , # Chinese version of Odyssey, don't show in docs
241
+ None , # Chinese version of Odyssey, don't show in docs
247
242
ODYSSEY .specs ,
248
243
dbc_dict ('honda_odyssey_extreme_edition_2018_china_can_generated' , 'acura_ilx_2016_nidec' ),
249
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES
244
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
250
245
)
251
- ACURA_RDX = HondaPlatformConfig (
246
+ ACURA_RDX = HondaNidecPlatformConfig (
252
247
"ACURA RDX 2018" ,
253
248
HondaCarInfo ("Acura RDX 2016-18" , "AcuraWatch Plus" , min_steer_speed = 12. * CV .MPH_TO_MS ),
254
249
CarSpecs (mass = 3925 * CV .LB_TO_KG , wheelbase = 2.68 , steerRatio = 15.0 , centerToFrontRatio = 0.38 ), # as spec
255
250
dbc_dict ('acura_rdx_2018_can_generated' , 'acura_ilx_2016_nidec' ),
256
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
251
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
257
252
)
258
- PILOT = HondaPlatformConfig (
253
+ PILOT = HondaNidecPlatformConfig (
259
254
"HONDA PILOT 2017" ,
260
255
[
261
256
HondaCarInfo ("Honda Pilot 2016-22" , min_steer_speed = 12. * CV .MPH_TO_MS ),
262
257
HondaCarInfo ("Honda Passport 2019-23" , "All" , min_steer_speed = 12. * CV .MPH_TO_MS ),
263
258
],
264
259
CarSpecs (mass = 4278 * CV .LB_TO_KG , wheelbase = 2.86 , centerToFrontRatio = 0.428 , steerRatio = 16.0 ), # as spec
265
260
dbc_dict ('acura_ilx_2016_can_generated' , 'acura_ilx_2016_nidec' ),
266
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
261
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
267
262
)
268
- RIDGELINE = HondaPlatformConfig (
263
+ RIDGELINE = HondaNidecPlatformConfig (
269
264
"HONDA RIDGELINE 2017" ,
270
265
HondaCarInfo ("Honda Ridgeline 2017-24" , min_steer_speed = 12. * CV .MPH_TO_MS ),
271
266
CarSpecs (mass = 4515 * CV .LB_TO_KG , wheelbase = 3.18 , centerToFrontRatio = 0.41 , steerRatio = 15.59 ), # as spec
272
267
dbc_dict ('acura_ilx_2016_can_generated' , 'acura_ilx_2016_nidec' ),
273
- flags = HondaFlags .NIDEC | HondaFlags . NIDEC_ALT_SCM_MESSAGES ,
268
+ flags = HondaFlags .NIDEC_ALT_SCM_MESSAGES ,
274
269
)
275
- CIVIC = HondaPlatformConfig (
270
+ CIVIC = HondaNidecPlatformConfig (
276
271
"HONDA CIVIC 2016" ,
277
272
HondaCarInfo ("Honda Civic 2016-18" , min_steer_speed = 12. * CV .MPH_TO_MS , video_link = "https://youtu.be/-IkImTe1NYE" ),
278
273
CarSpecs (mass = 1326 , wheelbase = 2.70 , centerToFrontRatio = 0.4 , steerRatio = 15.38 ), # 10.93 is end-to-end spec
279
274
dbc_dict ('honda_civic_touring_2016_can_generated' , 'acura_ilx_2016_nidec' ),
280
- flags = HondaFlags .NIDEC | HondaFlags .AUTORESUME_SNG | HondaFlags .ELECTRIC_PARKING_BRAKE ,
281
275
)
282
276
283
277
@@ -344,7 +338,6 @@ class CAR(Platforms):
344
338
],
345
339
)
346
340
347
-
348
341
STEER_THRESHOLD = {
349
342
# default is 1200, overrides go here
350
343
CAR .ACURA_RDX : 400 ,
0 commit comments