File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,7 +251,10 @@ def name(self):
251251 Examples:
252252 * TxPDO1_node4
253253 * RxPDO4_node1
254+ * Unknown
254255 """
256+ if not self .cob_id :
257+ return "Unknown"
255258 direction = "Tx" if self .cob_id & 0x80 else "Rx"
256259 map_id = self .cob_id >> 8
257260 if direction == "Rx" :
@@ -519,8 +522,8 @@ def set_data(self, data):
519522 :param bytes data: Value for the PDO variable in the PDO message as :class:`bytes`.
520523 """
521524 byte_offset , bit_offset = divmod (self .offset , 8 )
522- logger .debug ("Updating %s to %s in message 0x%X " ,
523- self .name , binascii .hexlify (data ), self .pdo_parent .cob_id )
525+ logger .debug ("Updating %s to %s in %s " ,
526+ self .name , binascii .hexlify (data ), self .pdo_parent .name )
524527
525528 if bit_offset or self .length % 8 :
526529 cur_msg_data = self .pdo_parent .data [byte_offset :byte_offset + len (self .od ) // 8 ]
You can’t perform that action at this time.
0 commit comments