@@ -86,6 +86,19 @@ def init(self):
86
86
if self .flags & ToyotaFlags .RADAR_ACC :
87
87
self .dbc_dict = {Bus .pt : 'toyota_nodsu_pt_generated' }
88
88
89
+ @dataclass
90
+ class ToyotaSecOCPlatformConfig (PlatformConfig ):
91
+ dbc_dict : dict = field (default_factory = lambda : dbc_dict ('toyota_secoc_pt_generated' , 'toyota_tss2_adas' ))
92
+
93
+ def init (self ):
94
+ # don't expose car docs until SecOC cars can be suppressed from the comma website
95
+ self .car_docs = []
96
+
97
+ self .flags |= ToyotaFlags .TSS2 | ToyotaFlags .NO_STOP_TIMER | ToyotaFlags .NO_DSU | ToyotaFlags .SECOC
98
+
99
+ if self .flags & ToyotaFlags .RADAR_ACC :
100
+ self .dbc_dict = {Bus .pt : 'toyota_secoc_pt_generated' }
101
+
89
102
90
103
class CAR (Platforms ):
91
104
# Toyota
@@ -250,13 +263,9 @@ class CAR(Platforms):
250
263
TOYOTA_RAV4_TSS2 .specs ,
251
264
flags = ToyotaFlags .RADAR_ACC | ToyotaFlags .ANGLE_CONTROL ,
252
265
)
253
- TOYOTA_RAV4_PRIME = PlatformConfig (
254
- # TODO: Enable this docs entry when it can be suppressed from openpilot CARS.md
255
- # [ToyotaCarDocs("Toyota RAV4 Prime 2021-23", min_enable_speed=MIN_ACC_SPEED)],
256
- [],
266
+ TOYOTA_RAV4_PRIME = ToyotaSecOCPlatformConfig (
267
+ [ToyotaCarDocs ("Toyota RAV4 Prime 2021-23" , min_enable_speed = MIN_ACC_SPEED )],
257
268
CarSpecs (mass = 4372. * CV .LB_TO_KG , wheelbase = 2.68 , steerRatio = 16.88 , tireStiffnessFactor = 0.5533 ),
258
- dbc_dict ('toyota_secoc_pt_generated' , 'toyota_tss2_adas' ),
259
- flags = ToyotaFlags .TSS2 | ToyotaFlags .NO_STOP_TIMER | ToyotaFlags .NO_DSU | ToyotaFlags .SECOC ,
260
269
)
261
270
TOYOTA_MIRAI = ToyotaTSS2PlatformConfig ( # TSS 2.5
262
271
[ToyotaCarDocs ("Toyota Mirai 2021" )],
@@ -268,13 +277,9 @@ class CAR(Platforms):
268
277
dbc_dict ('toyota_tnga_k_pt_generated' , 'toyota_adas' ),
269
278
flags = ToyotaFlags .NO_STOP_TIMER ,
270
279
)
271
- TOYOTA_SIENNA_4TH_GEN = PlatformConfig (
272
- # TODO: Enable this docs entry when it can be suppressed from openpilot CARS.md
273
- # [ToyotaCarDocs("Toyota Sienna 2021-23", min_enable_speed=MIN_ACC_SPEED)],
274
- [],
280
+ TOYOTA_SIENNA_4TH_GEN = ToyotaSecOCPlatformConfig (
281
+ [ToyotaCarDocs ("Toyota Sienna 2021-23" , min_enable_speed = MIN_ACC_SPEED )],
275
282
CarSpecs (mass = 4625. * CV .LB_TO_KG , wheelbase = 3.06 , steerRatio = 17.8 , tireStiffnessFactor = 0.444 ),
276
- dbc_dict ('toyota_secoc_pt_generated' , 'toyota_tss2_adas' ),
277
- flags = ToyotaFlags .TSS2 | ToyotaFlags .NO_STOP_TIMER | ToyotaFlags .NO_DSU | ToyotaFlags .SECOC ,
278
283
)
279
284
280
285
# Lexus
0 commit comments