@@ -359,7 +359,8 @@ def _raw_from(param):
359
359
subindex = (value >> 8 ) & 0xFF
360
360
# Ignore the highest bit, it is never valid for <= 64 PDO length
361
361
size = value & 0x7F
362
- if getattr (self .pdo_node .node , "curtis_hack" , False ): # Curtis HACK: mixed up field order
362
+ if getattr (self .pdo_node .node , "curtis_hack" , False ):
363
+ # Curtis HACK: mixed up field order
363
364
index = value & 0xFFFF
364
365
subindex = (value >> 16 ) & 0xFF
365
366
size = (value >> 24 ) & 0x7F
@@ -371,7 +372,7 @@ def _raw_from(param):
371
372
def save (self ) -> None :
372
373
"""Save PDO configuration for this map using SDO."""
373
374
if self .cob_id is None :
374
- logger .debug ( "Skipping %s: no cob-id set" , self .com_record .od .name )
375
+ logger .info ( "Skip saving %s: COB-ID was never set" , self .com_record .od .name )
375
376
return
376
377
logger .info ("Setting COB-ID 0x%X and temporarily disabling PDO" , self .cob_id )
377
378
self .com_record [1 ].raw = self .cob_id | PDO_NOT_VALID | (RTR_NOT_ALLOWED if not self .rtr_allowed else 0x0 )
@@ -422,7 +423,9 @@ def save(self) -> None:
422
423
self ._update_data_size ()
423
424
424
425
if self .enabled :
425
- self .com_record [1 ].raw = self .cob_id | (RTR_NOT_ALLOWED if not self .rtr_allowed else 0x0 )
426
+ cob_id = self .cob_id | (RTR_NOT_ALLOWED if not self .rtr_allowed else 0x0 )
427
+ logger .info ("Setting COB-ID 0x%X and re-enabling PDO" , cob_id )
428
+ self .com_record [1 ].raw = cob_id
426
429
self .subscribe ()
427
430
428
431
def subscribe (self ) -> None :
0 commit comments