@@ -224,8 +224,10 @@ def __init__(self,
224
224
def generate_parameters (self , use_sim_time : bool = False ) -> None :
225
225
super ().generate_parameters (use_sim_time )
226
226
227
+ platform_model = self .clearpath_config .get_platform_model ()
228
+
227
229
# Add MCU diagnostic category for all platforms except A200
228
- if self . clearpath_config . get_platform_model () != Platform .A200 :
230
+ if platform_model != Platform .A200 :
229
231
self .param_file .update ({
230
232
self .DIAGNOSTIC_AGGREGATOR_NODE : {
231
233
'platform' : {
@@ -245,7 +247,7 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
245
247
})
246
248
247
249
# Add Lighting for every platform except A200 and J100
248
- if self . clearpath_config . get_platform_model () not in (Platform .A200 , Platform .J100 ):
250
+ if platform_model not in (Platform .A200 , Platform .J100 ):
249
251
self .param_file .update ({
250
252
self .DIAGNOSTIC_AGGREGATOR_NODE : {
251
253
'platform' : {
@@ -264,7 +266,7 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
264
266
})
265
267
266
268
# Add cooling for A300 only for now
267
- if self . clearpath_config . get_platform_model () == Platform .A300 :
269
+ if platform_model == Platform .A300 :
268
270
self .param_file .update ({
269
271
self .DIAGNOSTIC_AGGREGATOR_NODE : {
270
272
'platform' : {
@@ -316,14 +318,14 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
316
318
317
319
sensor_analyzers = {}
318
320
319
- if self . clearpath_config . get_platform_model () != Platform .A300 :
321
+ if platform_model not in ( Platform .A300 , Platform . A200 ) :
320
322
sensor_analyzers ['imu' ] = {
321
323
'type' : 'diagnostic_aggregator/GenericAnalyzer' ,
322
324
'path' : 'IMU' ,
323
325
'contains' : ['imu' ]
324
326
}
325
327
326
- if self . clearpath_config . get_platform_model () == Platform .J100 :
328
+ if platform_model == Platform .J100 :
327
329
sensor_analyzers ['gps' ] = {
328
330
'type' : 'diagnostic_aggregator/GenericAnalyzer' ,
329
331
'path' : 'GPS' ,
0 commit comments